reading-notes

FUNCTIONAL PROGRAMMING

Functional Programming Concepts

  1. What is functional programming? 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? It returns the same result if given the same arguments (it is also referred as deterministic),It does not cause any observable side effects
  3. What are the benefits of a pure function? The code’s definitely easier to test.,don’t need to mock anything Given a parameter A → expect the function to return value B,Given a parameter C → expect the function to return value D
  4. What is immutability? Unchanging over time or unable to be changed.
  5. What is Referential transparency? if a function consistently yields the same result for the same input, it is referentially transparent.

Node JS Tutorial for Beginners #6 - Modules and require()

  1. What is a module? module is JavaScript file
  2. What does the word ‘require’ do? what if we want to use this functionality elsewhere in the application where we use the require function
  3. How do we bring another module into the file the we are working in? so the way we do that is by same module exports and we set this equal to whatever we want to be made available outside of this module being returned to us when we require a particular module so then what we need to do is set this
  4. What do we have to do to make a module available? what we have to do inside this module is explicitly say what part of the module we want to make available to all the files which require this module okay so the way we do that is by same module exports and we set this equal to whatever we want to be made available outside of this module

## Things I want to know more about

about api