Why different output in IE and FF?
In IE its showing : Hello and In FF its showing : Hi
var message = "Hi";
setTimeout(function(){alert(message);},10);
setTimeout(function(){message = "Hello";},0);
what is standarad? which browser is doing it right?
Note: if i convert 10 to 11 in FF then it shows Hello
Firefox handles small delays differently to IE. Firefox have a min delay time of 10ms (which isn’t exact either).
See the notes of https://developer.mozilla.org/en/window.setTimeout for more info.