do you know javascript is a single-threaded language? but using a few smarter data structures, it gives us the illusion of multi-threaded. It means that the main thread where JavaScript code is run, runs in one line at a time manner and there is no p...