Say someone (evil) has set us a timer with setInterval, but we don\'t know its ID (we don\'t have the reference to the object, that setInterval is returning, no
Well, empirically trials in Chrome show that setInterval returns a number which increments for each call. So if you are SURE that you setInterval was the last one set the following would work :
function clearLastInterval () {
var i = setInterval (function () {}, 10000);
clearInterval (i-1);
clearInterval (i);
}
I'm not sure I would recommend this though ;-)