Can someone please tell me why this doesn't work in javascript. I come from a c++ background so please excuse my ignorence. ///////////////////////////////////////////////////////////////////// var mapArray = [ [0, 0, 0, 0 ,0], [0, 1, 0, 0 ,0], [0, 0, 0, 0 ,0], [0, 0, 0, 0 ,0], [0, 0, 1, 1 ,0]];/////////////////////////////////////////////////////////// for (var y = 0; y < 5; y++) { for (var x = 0; x < 5; x++) { if (mapArray[y][x] == 1) {// Do Something } } }