Tag javascript execution

JavaScript Execution – III

To read the first part of this series click here. Until now, we have seen how JavaScript executes the code line-by-line. In this post, we will talk about how JavaScript engine works on a high level [the important parts]. Let’s start with the first and most important component of the JavaScript engine, i.e. call stack. The

Read More


JavaScript Execution – II

To read the part 1 of this post, click here. Simple function expression Let’s take this example: I have created foo variable before assigning a value to keep the execution simple. Let’s go through the two phase execution for this piece of code. Phase 1: Line 1: New variable foo, allocate memory for foo. Line 2:

Read More


JavaScript Execution – I

JavaScript is an interpreted language. It means, it is executed line-by-line, and if there is an error at line 10 of the code, rest of the code (line 11 onwards) will never be executed. Even all other unrelated codes will also not execute if the JavaScript engine fails at a point and they come next

Read More