有以下方法:typeof、instanceof 、constructor(构造函数)、Object.prototype.toString.call
1.
Object.prototype.toString.call(12)
“[object Number]”
2.
new Number(22) instanceof Number
true
3.
“ds”.constructor
ƒ String() { [native code] }
4.
typeof “abc”
“string”