I populate an associative array in PHP and access the array in a JS function. I use json_encode() to convert PHP array to JS array. I use IE 8 to run this application. In some machines with IE 8 for(;;) works but fail in others. In some machines with IE 8 for(var in) works but fail in others. What's the difference between the following code?
for (var k = 0; k < ruleList.length; k++){ //do something }
for (var x in ruleList){ //do something }