单项选择题
下列程序的输出是:()。
function Ball() {
}
Ball.prototype = {
colors:['green','yellow']
}
var ball1 = new Ball()
var ball2 = new Ball()
ball1.colors.push('blue')
console.log(ball2.colors)
A.[’green,’yellow’]
B.[’green,’yellow’,’blue’]
C.undefined
D.以上都不对
点击查看答案
相关考题
-
单项选择题
var warp = document.getElementById("wrap");以下DOM操作存在语法正确的有()
A.wrap.innerHTML("HELLO WORLD");
B.wrap.style.background-image="img/bg.jpg"
C.wrap.style.border="1px solid#f00";
D.wrap.width="200px"; -
单项选择题
以下不属于正则的方法有()
A.match
B.test
C.split
D.splice -
单项选择题
<p class="MsoNormal"> var str = ""; var reg = /]+>/g;一下哪个选项返回的是true()
A.str.match(reg)
B.reg.test(str)
C.reg.exec(str);
D.str.search(reg)
