Last Updated: September 09, 2019
·
1.577K
· johannesboyne

Array copy Javascript

Copying a whole array into a new one:
> var a = [1,2,3,4,5,6]; var b = a.slice();
> b
[ 1,
2,
3,
4,
5,
6 ]