32
Hot take: Visualizing recursion with a family tree finally made it click for me
I kept hitting walls with recursive functions in my JavaScript practice, so I drew out a family tree to map each call and return. Seeing the hierarchy visually broke down the mental barrier and helped me understand the stack buildup. What's your go-to method for tackling tough concepts when tutorials fall short?
3 comments
Log in to join the discussion
Log In3 Comments
lane.tessa7d ago
Oh wow, that family tree trick is so clever, I'm stealing that.
4
tara_garcia287d ago
Used a similar method to untangle my grandma's stories last year, @lane.tessa. Turns out she had like THREE different versions of how she met my grandpa. It was a MESS but that trick helped sort it out.
4
the_finley6d ago
Sometimes the messy versions @tara_garcia28 are better though
8