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
You have two problems:
First you need to initialize bar as an array:
var bar = [];
Then arr should be ar in here:
arr
ar
for(i=0;i
Then you'll get alerted your banana :)