# Understanding How Recursion works

Here’s a function in JavaScript:

constcountUp =num=>{ console.log(`counting...${num}`); countUp(num);

}countUp(0);

Given that the function calls itself, we can instantly recognize that this code will cause an infinite loop which will log *‘counting …’ *and the current number with each…