Skip to content

Recursion

Arghun-dev edited this page Jul 24, 2021 · 8 revisions

What is Recursion ?

A process (a function in our case) which calls itself.

It's everywhere: JSON.parse, JSON.stringify

The Call Stack

  1. Any time a function is invoked it is placed (pushed) on top of the call stack.
  2. When Javascript sees the return keyword, or when the function ends, the compiler will remove (pop)

Clone this wiki locally