javascript - clearInterval() what happens with the last interval call -


var interval = setinterval(function()                 { function }, 1000);   clearinterval(interval); 

what happens last interval call when clearinterval called? if interval 500 out of 1000 (.5 seconds) interval , clearinterval called, function called , interval cancelled? or function not called , interval cancelled?

thanks

if specified interval hasn't yet elapsed, callback not invoked again. standard isn't clear on happen if interval has elapsed callback has not yet been processed event queue, in case there 500 ms remaining before next invocation, shouldn't invoke callback again.


Comments

Popular posts from this blog

java - Suppress Jboss version details from HTTP error response -

gridview - Yii2 DataPorivider $totalSum for a column -

Sass watch command compiles .scss files before full sftp upload -