I faced this strange situation where foreach like construct of javascript does not work in IE but it works in FF. Well not all for..in
just this special funcito
Try using this as a format function:
String.prototype.format = function() {
var me = this;
for (var i = 0; i < arguments.length; i++)
me = me.replace(new RegExp('\\{' + i + '\\}', 'g'), arguments[i]);
return me;
}
Now this should work:
alert('The {0} is dead. Don\'t code {0}. Code {1} that is open source!'.format('ASP', 'PHP'))
DEMO
Tested and working in IE