reading-notes

My reading notes


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

Functional Programming

Functional Programming Concepts

  1. What is functional programming?
    • It’s a way of programming by means of using functional logic to your code to create clean and maintainable code
  2. What is a pure function and how do we know if something is a pure function?
    • pure functions given the same input will always return the same output
  3. What are the benefits of a pure function?
    • They are easier to test
  4. What is immutability?
    • Immutability is when its datas state cant be changed after it has been created
  5. What is Referential transparency?
    • An expression that can be replaced with its corresponding value with zero adverse effects to its programming

Node JS

  1. What is a module?
    • A module is file containing self contained code that is imported and exported to share functionality
  2. What does the word ‘require’ do?
    • It the easiest way of including our modules in JS files
  3. How do we bring another module into the file the we are working in?
    • require(./example.js);
  4. What do we have to do to make a module available?
    • module.exports = example;