> For the complete documentation index, see [llms.txt](https://javascript-1.gitbook.io/javascript/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://javascript-1.gitbook.io/javascript/fp.md).

# FP

The idea of Functional programming is originated from Mathematics, the Lambda Calculus. Function Programming is all about separation of concerns, is all about separating code into a chunks.

#### 4 principles of FP:

1. Pure functions
2. Closures
3. Higher Order Function
4. Compose and Pipe
