Home | Mailing List | Blog | Tutorial Videos

Date Constructor

Consider the following code block which calls the Date constructor with 2 type of values. What will be the output of console.log?

let a = new Date("2019,1,1").toLocaleDateString();
let b = new Date(2019,1,1).toLocaleDateString();
console.log(a, b)

Select one: