Parse int & typeof operator
by SriSri M
JavaScript
var x = "xyz";
var y = parseInt(x);
console.log(parseInt(x)+" "+typeof(y));
typeof "John" // Returns string
typeof 3.14 // Returns number
typeof NaN // Returns number
typeof false // Returns boolean
typeof [1,2,3,4] // Returns object
typeof {name:'John', age:34} // Returns object
typeof new Date() // Returns object
typeof function () {} // Returns function
typeof myCar // Returns undefined *
typeof null // Returns object