Menu
Hello, I am a javascript learner, I have a question to confuse.
[CODE]
var a = [1,2,3];
var b = a;
a[0] = 99;
alert(b);
The alert output is : 99,2,3
If I really want to copy value of a into b variable, how can I do ?
( I mean, if I want to use copy way, then the alert output can show 1,2,3
how to write the javascript?? or javascript can’t do that ??)
Thanks!