Introduction about javascript event loops
What is Javascript? Javascript is a single threaded Programming Language. Ie) Single threaded runtime. It has single call stack which means that it can do only one thing at a time. (Single-Threaded, non- blocking, asynchronous, concurrent language & uses callbacks) What Is V8? It is a chrome javascript engine. (Runtime of Javascript) What is Call Stack? It is a Data Structure which records where in the program we are. Stack: It is a data structure which is used within Javascript to keep track of execution flow or order during your javascript program execution. Say For Example: function add(arg1, arg2) { Return arg1+arg2; } Function print(input) { var result = add(inputNum, inputNum); } Print(1); If the above program runs within JS engine, it will produce the following call mechanism within the stack data structure. Rules: When a JS engine finds the function call, it will ad...