Javascript Array lastElement()

Description

Javascript Array lastElement()


Array.prototype.lastElement = function() {
  return Array[Array.length-1];
};

Javascript Array lastElement()

Array.prototype.lastElement = function() {
  return this[this.length - 1];
}



PreviousNext

Related