Very simple thing I am trying to do in JS (assign the values of one array to another), but somehow the array bar\'s value doesn\'t seem affected at all.
bar
In your code, the variable arr in the for loop is not the same as your original array ar: you have one too many r.
arr
ar
r