var a = NaN; var b= '222'; var c = null; var d = false; var e = undefined; var f = Symbol(); var arr = ['aa','bb','cc']; var obj = { 'a': 'aa', 'b': 'bb', 'c': 'cc' }; var res = Object.prototype.toString.call(arr); console.log(res); //[object Array] var res2 = Object.prototype.toString.call(obj); console.log(res2); //[object Object] var res3 = Object.prototype.toString.call(a); console.log(res3); //[object Number] var res4 = Object.prototype.toString.call(b); console.log(res4); //[object String] var res4 = Object.prototype.toString.call(c); console.log(res4); //[object Null] var res5 = Object.prototype.toString.call(d); console.log(res5); //[object Boolean] var res6 = Object.prototype.toString.call(e); console.log(res6); //[object Undefined] var res7 = Object.prototype.toString.call(f); console.log(res7); //[object Symbol]