setInterval function knows how to clear itself

Hehe, this is nuts. Someone wanted to know how to give the function the power to clear itself without knowing of the variable that holds the interval id. I figured, “Why not put that on the Function object?”

Well, it frikin’ worked! Check it…

3 Replies to “setInterval function knows how to clear itself”

  1. No, I realized after my posting thanks to Santiago that my code wouldn’t work as expected, so to save threads telling me thus, I linked to it rather than modify the post.

    However, yes, you are correct in your most astute observation. Bleh!!!!!!

Comments are closed.