· 7 years ago · Apr 09, 2018, 12:46 AM
1// Array Remove - By John Resig (MIT Licensed)
2Array.prototype.remove = function(from, to) {
3 var rest = this.slice((to || from) + 1 || this.length);
4 this.length = from < 0 ? this.length + from : from;
5 return this.push.apply(this, rest);
6};