相关考题
-
单项选择题
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
