reading-notes

Functional Programming

  1. 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

  2. What is a pure function and how do we know if something is a pure function? your code can be used for multiple things and get the same output
  3. What are the benefits of a pure function?

it is easier to test and you don’t need to mock anything

  1. What is immutability? unchanging over time and or unable to change
  2. What is Referential transparency? your functions will get the same output and they are pure

Video Notes

  1. What is a module? It is another javascript file that can be easy to use and can be extended
  2. What does the word ‘require’ do? it will call the module and you are able to use it
  3. How do we bring another module into the file the we are working in? you would use require and then use your ./ and then the path
  4. What do we have to do to make a module available? you would use module.exports