[英]Why typeof + is not “function” javascript
As in the title, why 如标题所示,为什么
typeof +
doesn't give "function"? 不提供“功能”?
typeof
only returns types of objects ( pretty much everything in JS ) and primitives. typeof
只返回对象的类型( JS中几乎所有内容 )和基元。
See the MDN documentation for typeof
. 有关typeof
请参见MDN文档 。
As rid points out, +
is an operator and not an object or primitive. 正如rid指出的, +
是运算符,而不是对象或基元。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.