# A few questions about how Recursion works

**URL:** <https://forum.freecodecamp.org/t/a-few-questions-about-how-recursion-works/341494>\
**Category:** Curriculum Help\
**Tags:** javascript\
**Created:** [January 15, 2020, 12:39pm UTC](https://forum.freecodecamp.org/t/a-few-questions-about-how-recursion-works/341494 "2020-01-15T12:39:18Z")\
**Posts on this page:** 1\
**Showing post:** 13

<div class="post-metadata">

**Author:** ![joselvelez](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/joselvelez/32/118394_2.png) [@joselvelez](https://forum.freecodecamp.org/u/joselvelez)\
**Post date:** [January 23, 2020, 9:42pm UTC](https://forum.freecodecamp.org/t/a-few-questions-about-how-recursion-works/341494/13 "2020-01-23T21:42:46Z")

</div>

michaelnicol,

I asked a similar question regarding this exercise as well. See this post:

> [@Recursion inside of a constant](http://forum.freecodecamp.org/t/recursion-inside-of-a-constant/343884):
>
> Tell us what’s happening: I am struggling to understand / follow what is happening in this example with the function inside the const countArray. When the countup function is called in the initialization of const countArray and begins counting down from n-1, is an array created inside this constant? It must seem so because the next line adds (using push array method) 5 to it. Is there a way for me to see this happen step by step so I can better understand what is happening under the hood? I …

This might help.

---

_[View the full topic](https://forum.freecodecamp.org/t/a-few-questions-about-how-recursion-works/341494)._
