【发布时间】:2013-03-29 10:30:35
【问题描述】:
有人可以解释为什么 typeof 的行为方式如下:
typeof
//Returns: SyntaxError: Unexpected token } (Quite obvious)
"Why am I a " + typeof
//Returns: SyntaxError: Unexpected token }
"Why am I a " + typeof + "";
//Returns: "Why am I a number"
"Why am I a " + typeof + "??";
//Returns: "Why am I a number"
【问题讨论】:
标签: javascript typeof