JavaScript is a single-threaded scripting language. This means                 it can only do 1 thing at a time.

JavaScript: V8 Engine

submited by
Style Pass
2023-03-24 11:30:03

JavaScript is a single-threaded scripting language. This means it can only do 1 thing at a time.

It has 1 call stack. An array with 2 operations: push (adds an element to the top) & pop (removes an element from the top). “Last In, First Out” protocol (LIFO).

When the engine executes a script, it pushes the global execution context, main(), into the call stack. Items in the call stack are called stack frames.

When a function is invoked, its execution context gets pushed into the call stack.

When the function returns (or there are no more lines to execute), it gets popped out of the call stack.

Purpose: to compile JavaScript Implements ECMAScript as specified in ECMA-262 Open source Developed by Google Written in C++

Leave a Comment