Hacker News new | past | comments | ask | show | jobs | submit login

My go to for people new to JS.



I'm learning Javascript. I can safely say im comfortable with most fundemental programming concepts...then the book starts talking about recursive functions.

Suffice to say once I hit that section I went back to codeacademy finished the course (which never brought them up and I'm not sure if that's good or bad) now I'm back in Eloquent Javascript...it get's really hard really fast.


Lot's of books throw recursion at beginners and expect them to understand it as intuitively they would a loop. But it's not intuitive at all (at least it wasn't for me).

I like the book "The Little Schemer" to learn recursion. Yes, a whole book to learn something other books briefly throw at you. You will not regret the read.


To get comfortable with recursion, you should check out a simple functional language like Scheme (https://mitpress.mit.edu/sicp/full-text/book/book.html)


Not having any real experience with JS programming, is this talking about privately named functions (e.g. var MyFunction = function MyHiddenName (blah){}) or was this not being familiar with recursion? Or is there something else funky in JS that I just don't know about?


He's talking about recursion - a function calling itself. I find it's funny that factorials are understood easily in high school, but then recursion is mind blowing in front of a computer. Just like factorials, it can be understood best by walking through it with paper and pencil.

The examples in Eloquent Javascript need to be studied by the reader to get the most out of that book. I think people just glance at them with out typing them up and running them.


recursive function is just a fancy word for a function that calls itself.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: