typeof
If you’ve ever heard about typeof operator in javascript than, how about those few questions:
- what is typeof typeof ‘string’ ?
- what is typeof typeof?
Answers
The first one is “string”. Yes if there you have the following code:
typeof something_undefined
that gives of course undefined, but if there is typeof typeof something_undefined the answer is string, because “udefined” itself is a string.
The second question is simple javascript error, there is no case with typeof typeof only.
Related posts:
- JavaScript typeof operator
- Does JavaScript undefined Equals undefined?
- How to detect a variable existence in JavaScript?




Hi there, how do I get ahold of you? Couldn’t find an email.
Here’s my bio for more background, http://andrewchenblog.com/about/
Andrew
You can find me on:
popov at stoimen dot com