setInterval function callback
CharlesKuncheria opened this issue · 4 comments
CharlesKuncheria commented
Why cant we see the setInterval's callback function in the queue?
jweinsteincbt commented
Works as long as you don't use ES6 arrow syntax =>
setInterval(function E() { console.log('E'); }, 5000);
juliogc commented
jweinsteincbt commented
I see the commands being run in setInterval
but not the name of the function in 'Web Apis' column, and setInterval is incorrectly returning null
instead of something which can be called by clearInterval
.
juliogc commented
The return
is just a logic breaker to stop the interval when it to be in 5 seconds or higher loop, but the point is just that I'm not able to see the doStiff
method in "Web Apis" column to understand how setInterval
differs to setTimeout
in event loop cicle.