var a=[1,2,3];
var b = a;
a[1]=4;
alert(a);
alert(b);
I cannot figure out why is the array B is [1,4,3] as well.
My second question is: how can I complete the function sum(a)(b), so it will return the value of a+b. For example if call sum(2)(4) it will return 6?