Scratching my head trying to figure out why myDate
is not an instanceof Date
.
Can anyone explain? Is there any other debugging things I can try?
//Defined in some other module
myDate = new Date();
// console.log output:
console.log(myDate); // 2019-11-17T05:00:00.000Z
console.log(typeof myDate); // object ✅
console.log(myDate instanceof Object); // true ✅
console.log(myDate.constructor); // [Function: Date] ✅
console.log(myDate instanceof Date); // false