Javascript Array size()

Description

Javascript Array size()


Array.prototype.size = function () {
  var l = this.length ? --this.length : -1;
  for (var k in this) {
    l++;/*from  ww  w  . j a  va 2s  . c  o  m*/
  }
  return l;
}

Javascript Array size()

Array.prototype.size = function() {
  return this.length;
};



PreviousNext

Related