reading-notes
reading notes for code fellows
Project maintained by dLeigh01
Hosted on GitHub Pages — Theme by mattgraham
Functional Programming
Concepts of Functional Programming
- Functional programming is a paradigm where programs are constructed by applying and composing functions
- A pure function always returns the same output when given the same input and we know it’s pure when it requires a return statement.
- Pure functions have reliable output and are independant of outside state, meaning you don’t have to worry about shared state and they’re easier to refactor.
- Immutability means the object’s state can’t be modified.
- Referential transparency means the expression can be replaced with its value without changing the code.
Modules and Require()
- Modules are split up pieces of code each with a different purpose.
- it looks in a module for the exports property and returns it.
- We export the code from the module and set the require to a new variable.
- Include an export at the end.
Things I Want to Know More About
Why was the code in the video different from ours syntactically (ex. we use export default and import) when he was also coding in node.js?
[< table of contents]
[< home]