Functional Programming in JavaScript
There are different "paradigms" (just a fancy word which means "ways of programming"!) in JS programming like Object Oriented, Functional, Imperative etc Object Oriented involves all the OOPS concepts as we all know like Inheritance, Abstraction, Encapsulation, Polymorphism Imperative programming involves coding in an imperative way, l ike first do this, then do that etc Functional Programming Everything is expressed in the program in terms of “functions”. This function takes an input and returns the transformed data as output Avoid side effects in functions, Use PURE functions: Any function that computes its output purely from the inputs it receives as arguments (should not modify other global data, change any other variable). Printing something to the console is also not “returning” an output. Basically, the function has to read the input, take that, and only that to compute an output. Functional programming means thinking of functions as purely as poss...