Run ❯
Get your
own
website
Result Size:
625 x 565
×
Change Orientation
Save Code
Change Theme, Dark/Light
Go to Spaces
<!DOCTYPE html> <html> <body> <h1>JavaScript Dates</h1> <h2>The getMilliseconds() Method</h2> <p>Return the milliseconds of a date as a number (0-999):</p> <p id="demo"></p> <script> const d = new Date("2021-03-25"); document.getElementById("demo").innerHTML = d.getMilliseconds(); </script> </body> </html>