Reading Functional Programming Concepts
What is functional programming?
- Generally, functional programming means using functions to the best effect for creating clean and maintainable software
What is a pure function and how do we know if something is a pure function?
- The ideal in functional programming is what is known as pure functions. A pure function is one whose results are dependent only upon the input parameters, and whose operation initiates no side effect, that is, makes no external impact besides the return value.
What are the benefits of a pure function?
Simple Architecture
Reduced to only arguments and it’s returned value
What is immutability?
- Not modifying the input outside of the function
What is Referential transparency?
- Referential Transparency emphasizes that an expression in a JavaScript program may be replaced by its value or any other variable having the same value without changing the result of the program. As a result, methods should always return the same value for the given argument without any side effects.
Videos Node JS Tutorial for Beginners #6 - Modules and require()
What is a module?
- a module is a file that contains certain functionality that is related.
What does the word ‘require’ do?
- require forces node to pull in certain files based off the passed path
How do we bring another module into the file we are working in?
- require(‘./path to module’);
What do we have to do to make a module available?
- within the module you must append module.exports = “function to be made available”