This is a collection of prototypes to extend the Array objects. When including these in your code you will be able to use them as Array member functions.
Array.prototype.deleteElement = function (el)
{
var i = this.indexOf(num);
if(i != -1)
this.splice(i, 1);
}
Array.prototype.deleteAt = function (i)
{
this.splice(i, 1);
}
Array.prototype.lastElement = function()
{
return this[this.length -1];
}
|
Menu |