Pure Functions are very simple functions that only operate on their input parameters.
function add(x, y) {
return x + y;
}
- Most useful Pure Functions must take at least one parameter
- All useful Pure Functions must return something
- Pure Functions will always produce the same output given the same inputs
- Pure functions have no side effects
- There are no variables in Functional Programming
- Functional Programming uses recursion to do looping
- In Functional Programming, a function is a first-class citizen of the language. In other words, a function is just another value