|
| 1 | +# Functional JavaScript |
| 2 | + |
| 3 | +## Intro |
| 4 | + |
| 5 | +No, I don't mean that JavaScript is normally *not* functional. Instead, this badge is to teach you how to write your JavaScript code using functions almost exclusively. There are a lot of interesting concepts that come about because of this: |
| 6 | + |
| 7 | +- Pure functions, or functions that take arguments and return a value without mutating a variable outside of the function. This makes it so you know every time you run a function with the same arguments it will return the same value. |
| 8 | +- Higher order functions, or functions that take a function as an argument and return another function. |
| 9 | +- Immutability, or never changing the value of a variable in place. Once a variable is set, you never change that value. |
| 10 | +- How to handle side-effects of your functions, like performing network requests or writing to a file |
| 11 | +- The difference between imperative and declarative programming |
| 12 | + |
| 13 | +It's a powerful paradigm which JavaScript supports. Learning it will help prepare you to learn React, which is heavily inspired by a functional paradigm. |
| 14 | + |
| 15 | +## Suggested Learning |
| 16 | + |
| 17 | +- [Functional JavaScript Concepts](https://www.sitepoint.com/introduction-functional-javascript/) - Learn difference between imperative, object-oriented, and functional programming |
| 18 | +- [Functional Programming Concepts](https://medium.com/javascript-scene/master-the-javascript-interview-what-is-functional-programming-7f218c68b3a0) - Awesome article listing all the concepts you need to know in functional programming. |
| 19 | +- [Great Functional Programming Interactive Guide](https://tech.io/playgrounds/2980/practical-introduction-to-functional-programming-with-js/pure-functions) |
| 20 | + |
| 21 | +## Requirements |
| 22 | + |
| 23 | +- Complete the basic assignments in [Functional JavaScript Workshop](https://github.com/timoxley/functional-javascript-workshop) |
| 24 | +- Show that you have completed the basic assignments in the workshop in the `#requirements` Discord channel to show you have passed this requirement off. |
| 25 | + |
| 26 | +## Extra Learning |
| 27 | + |
| 28 | +- [Rethinking For Loops](https://hackernoon.com/rethinking-javascript-death-of-the-for-loop-c431564c84a8) |
| 29 | +- [Rethinking If Statements](https://hackernoon.com/rethinking-javascript-the-if-statement-b158a61cd6cb) |
| 30 | +- [Functional Composition](https://hackernoon.com/javascript-functional-composition-for-every-day-use-22421ef65a10) |
| 31 | +- [Functional Exercises](http://reactivex.io/learnrx/) - Tons of practice code to learn with |
| 32 | +- [Functional Programming Game](https://david-peter.de/cube-composer/) |
| 33 | + |
| 34 | +*This list is by no means complete. Feel free to add an issue or put in a pull request to update it.* |
| 35 | + |
| 36 | + |
| 37 | + |
| 38 | + |
0 commit comments