質問

As in the title, why

typeof +

doesn't give "function"?

役に立ちましたか?

解決

+ is an operator, it's not a function. typeof + is therefore a syntax error.

他のヒント

typeof only returns types of objects (pretty much everything in JS) and primitives.

See the MDN documentation for typeof.

As rid points out, + is an operator and not an object or primitive.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top