Do you know what will be the output of this code?
JavaScript
console.log(typeof typeof 1);
Show answer and explanation
This actually returns "string".
This expression is evaluated from right to left.
The first sub-expression evaluated actually is typeof 1 which will return "number".
Only after that the next sub-expression is evaluated which now is typeof "number" which returns "string".