javascript: array_push
by dreamvib ~ February 7th, 2008. Filed under: javascript, programming.one way of doing array push in javascript is by adding 1 to the length of the array.
for(d = 0; d< arr.length; d++){
arr2[arr2.length++] = arr[d];
}
one way of doing array push in javascript is by adding 1 to the length of the array.
for(d = 0; d< arr.length; d++){
arr2[arr2.length++] = arr[d];
}
February 8th, 2008 at 3:33 am
I’ve tried it and it works