What is functional programming?
In computer science, functional programming is a programming paradigm — a style of building the structure and elements of computer programs — that treats computation as the evaluation of mathematical functions and avoids changing-state and mutable data.
In very simple terms, functional programming treats functions as values. It revolves around taking functions as arguments and returning functions as values.
Check out the following example on codepen: