In my console's browser, when I do :
console.log(typeof(typeof))
it returns an error Uncaught SyntaxError: Unexpected token ')'
Why is that? Why can't I get typeof's type ?
typeof
is an operator like &&
, =
, ==
, or !
.
It isn't a value, variable or identifier.
As with any operator, when you apply it you get a value, and typeof something
will give you a string. (Just as something == somethingelse
will give you a boolean).
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加