TheOdinProject / javascript-exercises

MIT License
1.18k stars 30.27k forks source link

Update fibonacci-solution.js: add recursive solution #440

Closed AdishtJaglan closed 2 months ago

AdishtJaglan commented 2 months ago

Added the recursive approach to the solution.

Because

This PR also add a recursive solution to the question at hand. It might create some curiousity in the mind of the reader, which might lead to greater interest.

This PR

Issue

Closes #XXXXX

Additional Information

Pull Request Requirements

MaoShizhong commented 2 months ago

@AdishtJaglan Thank you for submitting this PR.

Introducing recursion here would not be pedagogically appropriate. This is likely to cause more confusion and questions for learners than beneficial knowledge. It also risks opening a huge rabbit hole into recursion way before it's appropriate to dive into that topic.

Recursion is taught later on in either full-stack pathway at a time that is more appropriate within the course. At this point, learners can then benefit from the structured guidance the course provides.

Diving into recursion without guidance and at a much earlier point in the course where learners will have far less experience with the tools and concepts in general, that doesn't seem like the best idea to me.