Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

rymatech
4,671 PointsIs there a JavaScript functional programming course as I notice there is one for Java?
Here is the link to the Java functional programming course(https://teamtreehouse.com/library/introduction-to-functional-programming), I was hoping there was one for JavaScript but can't find it.
4 Answers

Emmanuel C
10,635 PointsI doubt there would be one, since technically JavaScript is always in the style of functional programming. Even when you create classes and objects in JS, its just a fancy compiler illusion as it all turns into functions calling other functions behind the scene. Its part of the reason why when declaring a function in old school JS, you actually have to use the keyword function.

Marie Franklin
12,502 PointsThere is one course and one workshop related to functional stuff.. but Not exactly the same as Java,
https://teamtreehouse.com/library/understanding-closures-in-javascript
https://teamtreehouse.com/library/callback-functions-in-javascript

Marie Franklin
12,502 PointsI agree with Emmanuel

Brendan Whiting
Front End Web Development Techdegree Graduate 84,696 PointsThe closest equivalent to that Java course in the Treehouse library I think would be this one: JavaScript Array Iteration Methods. You don't have to call .stream()
as you do in Java, but it's the same basic idea (map, filter, reduce).
rymatech
4,671 Pointsrymatech
4,671 PointsI am building a calculator and I have the below array outside of the function and then the function mutates it, which I understand is poor coding practise.
How would I incorporate the array into the function, keep in mind there will be other functions (plus, minus etc) which also need to access the array and updated data within it.