Does SetInterval run things on a seperate thread? How does the method work?
问题 I've looked around trying to understand how SetInterval but only found how to use it. I already know it's functionality, I'm just curious about how it's able to run something on a separate thread when JS doesn't support threading(at least that's what I read). I hope I formulated the question properly. Thanks. 回答1: setInterval does not run anything on a different thread. It schedules something to run at certain times provided the JS runtime is idle at that time . You can try out this behavior