I am writing a check to see if a timeout is active. I was thinking of doing this:
var a = setTimeout(fn, 10);
// ... Other code ... where clearTimeout(a) can be called and set to null
if (a != null)
{
// do soemthing
}
I was wondering if it would ever be possible that a will be 0. In that case I would use a !== null