setInterval function callback
CharlesKuncheria opened this issue · comments
Why cant we see the setInterval's callback function in the queue?
Works as long as you don't use ES6 arrow syntax =>
setInterval(function E() { console.log('E'); }, 5000);
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
.
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.