I want to push all individual elements of a source array onto a target array,
target.push(source);
puts just source\'s reference on the tar
You could use the concat method:
var num1 = [1, 2, 3]; var num2 = [4, 5, 6]; var num3 = [7, 8, 9]; // creates array [1, 2, 3, 4, 5, 6, 7, 8, 9]; num1, num2, num3 are unchanged var nums = num1.concat(num2, num3);