A pure function is a function which:
1. Given the same input, returns the same output.
2. Has no side-effects
Benefits of Functional Programming
Currying is a transformation of functions that translates a function from callable as f(a, b, c) into callable as f(a)(b)(c).
You can shorten and simplify your code with the Array methods!
In FP, an important concept is Higher-order functions.
It's a function that accepts (what's typically called) a callback function.
In JS you can benefit by using libraries like Ramda or lodash/f.
Function Composition is an act of composing/creating functions that allow you to further simplify and compress your functions by taking functions as an argument and return an output.
It may also return another function as its output other than numerical/string values.
This is a cheat sheet describing the basics of FP in JS