Reading-Notes

View the Project on GitHub MohammadAl-khatib/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?
    • Does not cause side effects and returns and give same results for same arguments.
  3. What are the benefits of a pure function?
    • Easier to test codes
  4. What is immutability?
    • Not changing the state of data after creation
  5. What is Referential transparency?
    • Yielding the same results for the same input
  6. What is a module?
    • simple or complex functionality organized in single or multiple JavaScript files which can be reused throughout the Node. js application
  7. What does the word ‘require’ do?
    • Import
  8. How do we bring another module into the file the we are working in?
    • by require them.