Learn about Date object in JavaScript To get the current time and date create a Date object without any arguments. var now = new Date(); log(now) // Tue Mar 12 2019 21:14:43 GMT+0530 (India Standard Time) There are many ways of creating a Date object Passing milliseconds as arguments If there is single argument and …
Continue reading “Different ways to create Date in JavaScript.”