/ Published in: JavaScript

Remove the item from the array changing the length of the array.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
Array.prototype.remove = function(e) { var t, _ref; if ((t = this.indexOf(e)) > -1) { return ([].splice.apply(this, [t, t - t + 1].concat(_ref = [])), _ref); } };
Comments
