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 trialrymatech
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,636 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
13,358 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
13,358 PointsI agree with Emmanuel
Brendan Whiting
Front End Web Development Techdegree Graduate 84,738 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.