This is my reading notes for Code Fellows.
1)What is functional programming?
functional programming is a programming paradigm where programs are constructed by applying and composing functions.
2)What is a pure function and how do we know if something is a pure function?
The function always returns the same result if the same arguments are passed in. It does not depend on any state, or data, change during a program’s execution. It must only depend on its input arguments.
3)What are the benefits of a pure function?
4)What is immutability?
In object-oriented and functional programming, an immutable object (unchangeable object) is an object whose state cannot be modified after it is created.
5) What is Referential transparency?
An expression is called referentially transparent if it can be replaced with its corresponding value (and vice-versa) without changing the program’s behavior.
1) What is a module?
Modules are the blocks of encapsulated code that communicates with an external application on the basis of their related functionality.
3) What does the word ‘require’ do?
require() is used to consume modules. It allows you to include modules in your app. You can add built-in core Node.
4) How do we bring another module into the file the we are working in?
use require.
5) What do we have to do to make a module available?
use .exports