Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

The prototype cannot be accessed(HTML5)

Enthusiast ,
Jan 16, 2021 Jan 16, 2021

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())

 

 

128
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation