I was studying the Twitter source code, and I came across the following snippet:
window.setTimeout=window.setTimeout;window.setInterval=window.setInterval;
Why does Twitter redefine these functions?
Edit:
To see the code, go to any twitter user page, open the source of the page, and you will see that snippet in the second block of javascript.
This is a technique to replace
setTimeoutandsetIntervalfunctions globally in a cross-browser fashion.See http://www.adequatelygood.com/2011/4/Replacing-setTimeout-Globally.