Lemm will tell you one thing. Articles at W3Schools are certainly out of date, so you should not rely on this. Yes, when you give this in the console:
typeof (new Date())
The above code returns object , because JavaScript has only a few primitive types:

You can check if the date object is in use or not:
(new Date()) instanceof Date
The above code will return true . This is the right way to check if a particular variable is an instance of a particular type.

source share