reading-notes

reading notes for code fellows


Project maintained by dLeigh01 Hosted on GitHub Pages — Theme by mattgraham

Functional Programming

Concepts of Functional Programming

  1. Functional programming is a paradigm where programs are constructed by applying and composing functions
  2. 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.
  3. 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.
  4. Immutability means the object’s state can’t be modified.
  5. Referential transparency means the expression can be replaced with its value without changing the code.

Modules and Require()

  1. Modules are split up pieces of code each with a different purpose.
  2. it looks in a module for the exports property and returns it.
  3. We export the code from the module and set the require to a new variable.
  4. 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]