单项选择题
var hel="hello";
(function(){
var word="World";
console.log(hel+word);
})();以上代码最后一次打印的结果是( )
A.helloWorld
B.undefined
C.程序报错bar is not defined
D.null
点击查看答案
相关考题
-
单项选择题
foo(); function foo(){ console.log(a); var a=2; }描述错误的是()
A.foo函数存在函数提升
B.在函数内部的a变量存在变量提升
C.打印的结果是2
D.打印的结果是undefined -
单项选择题
function test() { console.log(a); console.log(fun()); var a = 1; function fun() { return 2; } } test();结果是()
A.undefined 2
B.2 undefined
C.undefined
D.2 -
单项选择题
(function() { console.log(3); setTimeout(function(){console.log(2)}, 2000); setTimeout(function(){console.log(1)}, 0); console.log(4); })();打印的结果是()
A.1 2 3 4
B.2 1 3 4
C.4 3 1 2
D.3 4 1 2
