(function(){ var foo; console.log(typeof foo); function foo(){} foo = "foo"; })();打印結(jié)果是()
A.function B.undefined C.string D.object
function test(){ var a=20; alert(a); setTimeout(function(){ a=30; alert(a); },2000); alert(10); } test();以上代碼的彈出順序是( )
A.20,10,30 B.20,20,10 C.20,10,20 D.20,30,10
A.Animal.prototype.type=”動(dòng)物”;Animal.prototype.say=function(){console.log(this.type)}); B.Animal={type:”動(dòng)物”,say:function(){console.log(this.type)} C.Animal.prototype({type:”動(dòng)物”,say:function(){console.log(this.type)}) D.以上說法都不正確