Add Array.push if needed - Node.js Array

Node.js examples for Array:Add Element

Description

Add Array.push if needed

Demo Code

if(Array.prototype.push == null){
  Array.prototype.push = function(item) { this[this.length] = item; return this.length; }
}

Related Tutorials