Home » JavaScript Date getMilliSeconds() Method

JavaScript Date getMilliSeconds() Method

by Online Tutorials Library

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.

Test it Now

Output:

238  

Example 2

Let’s see an example to print the value of milliseconds from the given time.

Test it Now

Output:

565  

Example 3

Let’s see an example to print complete current time.

Test it Now

Output:

13: 43: 32: 963  

Next TopicJavaScript Math

You may also like