單項(xiàng)選擇題
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
您可能感興趣的試卷
你可能感興趣的試題
1.單項(xiàng)選擇題function Animal(){}在Animal的原型上擴(kuò)展一個type的屬性,值為’動物’,擴(kuò)展一個say的方法,用于打印type屬性,正確的實(shí)現(xiàn)方法是()
A.Animal.prototype.type=”動物”;Animal.prototype.say=function(){console.log(this.type)});
B.Animal={type:”動物”,say:function(){console.log(this.type)}
C.Animal.prototype({type:”動物”,say:function(){console.log(this.type)})
D.以上說法都不正確
2.單項(xiàng)選擇題在list元素內(nèi)部末尾添加元素,以下正確的是()
A.appendChild
B.appendChildren
C.insertAfter
D.insertBefore