The letters 'JS' within a square

JavaScript: V8 Engine

How the V8 engine works

The letters 'JS' within a square

JavaScript: V8 Engine

How the V8 engine works

V8 Engine

Source Code

Memory Heap

Call Stack

Console

Call Stack

The call stack has a fixed size.

If the number of execution contexts exceed the size of the stack, the browser will throw an stack overflow error.

/index.js

function func() {
    func()
}

func()
                    
An arrow pointing right
2 arrows pointing left & right
main()
func()
func()
func()
func()
func()
func()
func()
func()
> RangeError: Maximum call stack size exceeded     index.js:2
  at func (index.js:2:3)
  at func (index.js:2:3)
  at func (index.js:2:3)
  at func (index.js:2:3)
  at func (index.js:2:3)
  at func (index.js:2:3)
  at func (index.js:2:3)
  at func (index.js:5:3)
>