107
rated 0 times
[
114]
[
7]
/ answers: 1 / hits: 15606
/ 8 Years ago, mon, august 8, 2016, 12:00:00
I have an array like var aa = [a,b,c,d,e,f,g,h,i,j,k,l];
I wanted to remove element which is place on even index. so ouput will be line aa = [a,c,e,g,i,k];
I tried in this way
for (var i = 0; aa.length; i = i++) {
if(i%2 == 0){
aa.splice(i,0);
}
};
But it is not working.
More From » arrays