A style of programming that emphasizes the use of functions and avoids changing-state and mutable data.
A pure function is a function that adheres to the strict deifintions of purity. A pur function must return the same result if give the same argument and caannot cause any observable side effects.
Pure functions are easier to test.
Immutability means cannot be change or cant be changed over time.
Referential transparency occurs when a function consistently yeilds the same results for the same input.
pure functions + immutable data = referential transparency
A self-contained block of code that has a certain functionality that can be called on when needed anywhere during the code.
Its used to load specify what module we want to bring into our working file and from what path the module is located at.
By using
var <variable> = require('./path to file/filename')
Explicityly say what part of the module we want to make available outside by using
module.exports = <module name>;