Functional programming style
-
Using pure functions that don’t have side effects and Don’t mutate the data.
-
Side effects
: When a function change (or depends upon) any variable outside it’s block. Ie declared outside of the function. This way they behave same and give same result everytime. -
Mutation
: State is never modified but copied, modified and return. Immutability enables us to keep track of data.