Skip to main content
chenjil43641795
Legend
January 17, 2021
Question

The prototype cannot be accessed(HTML5)

  • January 17, 2021
  • 0 replies
  • 146 views

var name = ["ysa","cde","adad"];
Array.prototype.myname=function(){

for (i=0;i<this.length;i++){
this[i]=this[i].toUpperCase();
//alert(typeof this[i])
}
}

alert(name.myname())

 

 

    This topic has been closed for replies.