Created
June 1, 2014 01:43
-
-
Save jikeytang/1960cb16a3b252505bcd to your computer and use it in GitHub Desktop.
[ Javascript ] - 20140601-题目1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript里typeof返回的结果有哪几种? | |
PS: | |
1. 回复时注意加上下面这句话,才会有语法高亮或格式缩进。 | |
```javascript | |
// you code | |
``` | |
2. 粘贴代码时请使用shift+tab,缩进前面的空白。 |
https://github.com/hjzheng/JavaScript-Test-Type-Table
基本上已经涵盖了所有的类型判断
补充两个上面链接中没有的:
typeof NaN == "number"
typeof arguments == "object"
typeof null =='object';
typeof [] =='object'
object, function, boolean, number, string, undefined
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
有6种,分别是:
typeof 返回的是一个字符串