We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
针对基本数据类型有效,比如:string number boolean symbol undefined,但是对于引用类型无效
typeof '' // string typeof [] // object
用来判断某数据值是否为 某某 的实例,返回 Boolean 值,检测的是原型
[] instanceof Array // true
''.constructor == String new Function().constructor == Function
用来返回某个数据值类型
Object.prototype.toString.call('') // "[object String]" Object.prototype.toString.call('').slice(8, -1) // String
The text was updated successfully, but these errors were encountered:
No branches or pull requests
typeof
针对基本数据类型有效,比如:string number boolean symbol undefined,但是对于引用类型无效
instanceof
用来判断某数据值是否为 某某 的实例,返回 Boolean 值,检测的是原型
constructor
Object.prototype.toString.call
用来返回某个数据值类型
The text was updated successfully, but these errors were encountered: