- console.log('1+2+3');
- console.log(eval('1+2+3'));
-
- 下面的typeof分别返回什么?
-
typeof null
-
typeof isNaN
-
typeof []
-
typeof [1, 2]
-
typeof 'leipeng'
-
var i = true;
alert(typeof i);
alert(typeof 1); -
var a;
alert(typeof a); -
function a(){;};
alert(typeof a) ; -
var box={};
alert(typeof box); -
var box={};
alert(box); -
var box =new Object();
alert(box); -
function king(){}
alert(king); -
var box="wjje";
alert(typeof "wjje");
alert(typeof box);
答案:
1. 1+2+3
2. 6
3. object 、function、object 、object 、string、
boolean number、undefined、function、object、
[object object]、[object object]、function king(){}、string string、
3. 5
3. 5
3. 5
3. 5
3. 5
3. 5
3. 5
3. 5
3. 5
3. 5
3. 5
3. 5
3. 5
3. 5
3. 5
3. 5
3. 5
3. 5
3. 5
网友评论