Before we start, lets define the environment in which the event loop operates. We assume that we are dealing with Javascript code that is executed by a browser (not in Node or other environment).
JavaScript programmers like to use words like, “event-loop”, “non-blocking”, “callback”, “asynchronous”, “single-threaded” and “concurrency”.We say things li…
JavaScript is a single-threaded programming language which means only one thing can happen at a time. That is, the JavaScript engine can only process one statement at a time in a single thread. While…
In JavaScript, all objects interact by reference when setting them equal to each other. So in this example toto and tutu share the same reference so if you change value from one, you will change the shared referrence and you will indirectly change the value of the other variable.