Reputation: 17333
So, what I mainly was wondering, was if clearTimeout(t);
is the same as t = undefined
.
Upvotes: 0
Views: 216
Reputation: 25555
It's pretty easy to test out for yourself. Here's a fiddle where you can see that Axel is correct: http://jsfiddle.net/s3sUU/.
Upvotes: 2
Reputation: 6235
No, the value returned by setTimeout is just a number, a primitive type, and it's just used like an "index" or "identifier" when used in clearTimeout. But it's not a pointer to the function.
Upvotes: 2