What is the best way to concat arrays in mutating way in JS? My problem:
var a = [1,2,3]
var b = a;
a = a.concat([4,5,6]) //<-- typical way of array concatenation in JS
console.log(a) //[1,2,3,4,5,6]
console.log(b) //[1,2,3] <-- I'd like it to be the same like the first array
I can use some loop of course, but I wonder if there is some faster and cleaner way to achieve it.