Answers for "array prototype js"

1

array prototype js

Array.prototype.myUcase = function() {
  for (i = 0; i < this.length; i++) {
    this[i] = this[i].toUpperCase();
  }
};
var fruits = ["Banana", "Orange", "Apple", "Mango"];
fruits.myUcase();
console.log(fruits)
Posted by: Guest on March-01-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language