What is functional programming?
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.
What is a pure function and how do we know if something is a pure function?
definition of purity:

- It returns the same result if given the same arguments (it is also referred as deterministic)
- It does not cause any observable side effects

What are the benefits of a pure function?
The code’s definitely easier to test. We don’t need to mock anything. So we can unit test pure functions with different contexts:
- Given a parameter A → expect the function to return value B
- Given a parameter C → expect the function to return value D
What is immutability?
Unchanging over time or unable to be changed.

What is Referential transparency?
Basically, if a function consistently yields the same result for the same input, it is referentially transparent.
pure functions + immutable data = referential transparency
What is a module?
Module in Node. js is a simple or complex functionality organized in single or multiple JavaScript files which can be reused throughout the Node. js application. Each module in Node. js has its own context, so it cannot interfere with other modules or pollute global scope.
What does the word ‘require’ do?
The basic functionality of require is that it reads a JavaScript file, executes the file, and then proceeds to return the exports object. It is worth noting that each time you subsequently require an already-required file, the exports object is cached and reused.
How do we bring another module into the file the we are working in?
Shall we export the function or any other things that you need to let it available to use it out side of module useing module.export and then we use require with name of file and assign it on variable to be able use it onnew file.
What do we have to do to make a module available?
Basiclly export it by useing module.export.