javascript check typeof object code example
Example 1: javascript detect if object is date
var myDate=new Date();
if(myDate instanceof Date){
//im a hot Date
}
Example 2: node js check type of variable
if (typeof i != "number") {
console.log('This is not number');
}