Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript jQuery Basics (2014) Creating a Password Confirmation Form Perfect

Functional Programming

In the jQuery Basics course, specifically the last video for the dropdown navigation project, Andrew seems to be encapsulating most of the case in functions and reusing them in other functions as well. Is this an example of the functional programming paradigm?

1 Answer

Mohammed Safiulla D
Mohammed Safiulla D
14,666 Points

I think Andrew was just teaching us how to make our code modular and was emphasizing on the DRY principle(Do No Repeat Yourself). I don't know much about functional programming but it's basically a programming paradigm which treats every computation as evaluation of a function and avoids changing-state and mutable data (treats everything as constants). Here is a nice intro to learning functional programming in JS (https://www.youtube.com/watch?v=e-5obm1G_FY)