I think you are deleting the elements of an array using an operator delete.
, , :
var a = [1,2,3];
delete a[0];
console.log(a); // results in [undefined, 2, 3]
, splice:
var a = [1,2,3];
a.splice(0,1);
console.log(a);
:
Array.prototype.removeAt = function (index) {
this.splice(index,1);
};