无码高清视频|成人自拍视频|欧美成人午夜无码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)搜題