87
rated 0 times
[
94]
[
7]
/ answers: 1 / hits: 55968
/ 9 Years ago, fri, october 23, 2015, 12:00:00
Whats the easiest way (with native javascript) to duplicate every element in a javascript array?
The order matters.
For example:
a = [2, 3, 1, 4]
// do something with a
a
// a is now [2, 2, 3, 3, 1, 1, 4, 4]
More From » arrays