PlaidCloud Beta
Tartan Solutions is pleased to announce the limited beta of PlaidCloud, our new application cloud.
Return to Akorn v0.4.1 Punchlist
The problem is observable in both Internet Explorer 6.x and Internet Explorer 7.x. It was not tested in Internet Explorer 8.
When these functions are added, they are added as properties on the Array object.
for (var x in obj) {
alert(obj[x]);
}
If you are looping through a list of properties in a JSON object, in all browsers you must use:
for (var x in obj) {
alert(obj[x]);
}
If you are looping through an ARRAY or a MAP in a JSON object, you must use either:
for (var i=0;i<arr.length;i++) {
alert(arr[i]);
}
(This mode works properly in all browsers, as it only loops through the numbered elements, not the added properties.)
Or you must use:
arr.forEach(function(obj) {
alert(obj);
});
(IMPORTANT NOTE: Using forEach will change the context of 'this' within the function, so be careful when referring to 'this' inside of a forEach loop.)