Functional Programming is important for readability and writing code that won’t produce side effects.
Node.JS allows us to use JS server side
“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” source
A pure function is a function that is determined by it’s parameters and doesn’t have side effects.
The benefits of a pure function are that if you continue to pass the same parameters you are guaranteed a certain return.
“When data is immutable, its state cannot change after it’s created.” source;
Referential Transparency is when a function does not depend on state in the application and only requires input into its parameters.
A module is like a component: A set of code that has a particular job
Require allows you to use certain functionalities globally(in different) filies
require('./fileYouWant')
You have to module.exports = whatever you want to make available.