First time using a recursive function

I use JavaScript within my job on a daily basis and have never once used a recursive function as a programmer. I learned the concept during my university days, but never actually thought I'd ever use it in the real world.

The challenge here was to parse a JSON file containing objects, and each object had its own child object. Now obviously the first thing that came to mind was to use the basic for conditional iterative method to loop through each notation, but this method would require you to know how many children each notation has.

Thanks to the 12 hours of studying and brain power, I finally fully understand the use of recursive functions!

recursive



LewyBlog - Blog software created by Lewis Williams