113
JavaScript Date getMilliseconds() method
The JavaScript date getMilliseconds() method returns the value of milliseconds in specified date on the basis of local time.
Syntax
The getMilliseconds() method is represented by the following syntax:
Return
An integer value between 0 and 999 that represents milliseconds in specified date.
JavaScript Date getMilliseconds() method example
Here, we will understand getMilliseconds() method through various examples.
Example 1
Let’s see an example to print current milliseconds.
Output:
238
Example 2
Let’s see an example to print the value of milliseconds from the given time.
Output:
565
Example 3
Let’s see an example to print complete current time.
Output:
13: 43: 32: 963
Next TopicJavaScript Math