I'm trying to merge 2 javascript arrays using indexes.
let's say I have array A
with
A[0] = 1;
A[1] = 9;
...
A[5] = 12;
and array B
with:
B[0 ... 5] = garbage, unused;
B[6] = 23;
B[7] = 99;
B[8] = 31;
...
B[10] = 990;
I want to merge A
with B
to do:
merged[0] = 1;
merged[1] = 9;
..
merged[5] = 12;
merged[6] = 23;
...
merged[10] = 999;
How can this be done?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.