Event loop - the secret behind JavaScript’s asynchronous programming. Since JS executes all operations on a single thread, but in a browser environment, it could give an illusion of multi-threading while using some smart data structure.
Learn the basic concepts about the JavaScript Event Loop.