so I ran into this strange problem. I have an array status=new Array(). Then I repeat from 0to N-1and assign. status[i]="idle";I tried to give a warning to check the values, and they are all assigned to the coma symbol ,. Does anyone know what happened?
status=new Array()
0
N-1
status[i]="idle";
,
var status=new Array(); window.onload = function() { for(var i=0;i<5;i++) { status[i]="idle"; alert(status[i]); } }
(, , ). window.status , , , - ( , , - ). var window, window.status .
window.status
var
window
() ( , Chrome) (source) .
, . Firefox . , Firefox window.status, Chrome .