Last active
August 29, 2015 14:03
-
-
Save jikeytang/20049967c535cc838f05 to your computer and use it in GitHub Desktop.
[ Javascript ] - 20140707-题目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
先不要运行,在回复中写出以下的结果: | |
1. var a; typeof a; | |
2. var s; s++; | |
3. !!'false'; | |
4. !!undefined; | |
5. typeof -Infinity; | |
6. 10 % '0'; | |
7. undefined == null; | |
8. typeof '2E+2'; | |
9. a = 3e+3; a++; | |
10. typeof ('2'+'1'); typeof ('2'-'1'); | |
11. 1.toString(); | |
12. typeof typeof 1; | |
PS: | |
1. 回复时注意加上下面这句话,才会有语法高亮或格式缩进。 | |
```javascript | |
// you code | |
``` | |
2. 粘贴代码时请使用shift+tab,缩进前面的空白。 |
syrxw
commented
Jul 7, 2014
1."undefined"
2. NaN
3. false
4. false
5. "number"
6. NaN
7. true
8. string
9. 3001
10. "string" "number"
11. 出错
1. var a; typeof a;=>undefined
2. var s; s++;=>NaN
3. !!'false';=>true
4. !!undefined;=>false
5. typeof -Infinity;=>NaN=》number
6. 10 % '0';=>NaN
7. undefined == null;=>false=>true
8. typeof '2E+2';=>String=>string
9. a = 3e+3; a++;=>不知=>3001
10. typeof ('2'+'1'); typeof ('2'-'1');=>不知=》string,number
11. 1.toString();=>"1"=>不知=》报错
12. typeof typeof 1;=>string
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment