I am a newbie of javascript,today I am facing a strange problem, I am using this code to get the current day:
const currentDate = new Date();
console.log(currentDate);
const day = currentDate.getDay();
console.log(day);
but the console output look like this:
> "2021-11-18T07:29:05.205Z"
> 4
why the day is 4 not 18?