in-place array push javascript code example
Example: array insertion javascript
Array.prototype.insert = function ( index, item ) {
this.splice( index, 0, item );
};
Array.prototype.insert = function ( index, item ) {
this.splice( index, 0, item );
};