author: ceon [+], Submitted: 12.27.02 4a • Last Edit: 08.12.03 5a

usage

msg1 { ceon [+], posted: 12.27.02 8a•-, top [^] }
nope :)
won't work .
check the debugger :




splice method seems to return an object .
msg2 { senocular [+], posted: 12.27.02 8a•12.27.02 9a, top [^] }
silly me, what was I thinking heh
splice does it alone

toto.splice(60,0,"titi")
msg3 { ceon [+], posted: 12.27.02 10a•-, top [^] }
ooops :)
you're right so ...
it's a bit useless but just for fun :
Array.prototype.insertAt = function(index,value)
{ this.splice(index,0,value);
};
msg4 { senocular [+], posted: 12.27.02 12p•-, top [^] }
it makes it more intutive :) I mean look at cyberfunk's 'invert a number':

Number.prototype.invert=function(){
return -this;
}

myNumber.invert()

when it would be easier to use

-myNumber

;)
msg5 { senocular [+], posted: 09.16.03 5a•-, top [^] }
This version [MX] will work on inserting arrays into the array - that is the array values of the array passed and not the array itself as one element