Easy Tutorial
❮ Met Cssstyle Getpropertyvalue Prop Img Usemap ❯

JavaScript toString() Method

JavaScript Date Object

Example

Convert the Date object to a string:

n Output result:


Definition and Usage

The toString() method converts a Date object into a string and returns the result.

Note: This method is automatically called when the Date object needs to be displayed as a string.


Browser Support

All major browsers support the toString() method.


Syntax

Return Value

Type Description
String The date and time as a string output

Technical Details

| JavaScript Version: | 1.0 | | --- | --- |

❮ Met Cssstyle Getpropertyvalue Prop Img Usemap ❯