Is there any reason why one should be used over the other?
e.g.
var arData=[\'a\',\'b\',\'c\']; arData.slice(1,1);//removes \'b\' var arData=[\'a\',
delete only makes that certain location of the array undefined but the array still contains 3 items: ['a',undefined,'c']
undefined
['a',undefined,'c']
the other way to do it is splice and not slice. splice totally removes that item and it's location, so you end up with ['a','c']
['a','c']