I'm having a little problem, I have a variable called 'widgets' and I want to store it's original value in 'storeWigets' and even if I update the value of 'widgets' my variable 'storeWidgets' stays with the original value of 'widgets'.
var widgets=["1","2","3","4"];
var storeWidgets;
storeWidgets = widgets;
widgets[0]=0;
alert(storeWidgets);
I have an example on jsfiddle, I need that in the end my 'storeWidgets' keeps the value ["1","2","3","4"] but it keeps returning me ["0","2","3","4"]