Javascript Array ucase()

Description

Javascript Array ucase()


function myfunction () {
  var fruits = ["apple","orange","banana","papaya","peach","guava"];
  fruits.ucase();//from ww  w  .  j a va2s .  c  o m
  document.getElementById("txt").innerHMTL=fruits;
  
  
}
Array.prototype.ucase = function() {
  for(var i=0;i<this.length;i++){
    this[i]=this[i].toUpperCase();
  }
}



PreviousNext

Related