99色精品-9色在线-99色在线-99色视频 国产欧美日产一区二区三区_亚洲精品亚洲人成在线观看_四虎在线精品永久观看_免费一级a一片久久精

單項(xiàng)選擇題

function Animal(){}在Animal的原型上擴(kuò)展一個(gè)type的屬性,值為’動(dòng)物’,擴(kuò)展一個(gè)say的方法,用于打印type屬性,正確的實(shí)現(xiàn)方法是()

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.以上說(shuō)法都不正確

微信掃碼免費(fèi)搜題