any simply way ?
this is my code:
var a=[1,2,3,4]
a.slice(0,1)
alert( a)
and it print [1,2,3,4]
thanks
any simply way ?
this is my code:
var a=[1,2,3,4]
a.slice(0,1)
alert( a)
and it print [1,2,3,4]
thanks
You should rather use splice instead of slice:
var a = [1,2,3,4];
a.splice(1, 1);
alert(a);