- typeOf()
console.log(typeof (2)); //number
console.log(typeof ('a')); //string
console.log(typeof ([])); //object
console.log(typeof ({})); //object
console.log(typeof (null)); //object
console.log(typeof (undefined)); //undefined
console.log(typeof (NaN)); //number
console.log(typeof ('')); //string
console.log(typeof (function () {})); //function