reading-notes

My reading notes journal for Code Fellows

View the Project on GitHub

*Readings: Functional Programming

Functional Programming Concepts

  1. What is functional programming? 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? Pure functions are stable, consistent, and predictable. The code’s definitely easier to test.
  4. What is immutability? When data’s state cannot change after it’s created.
  5. What is Referential transparency? When a function consistently yields the same result for the same input.

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

  1. What is a module? A file containing related code like another javascript file.
  2. What does the word ‘require’ do? It reads the javascript file and its a path to the module.
  3. How do we bring another module into the file the we are working in? in this example he uses var counter = require(‘./count’), console.log(counter([‘shaun’, ‘crystal’, ‘ryu’]));
  4. What do we have to do to make a module available? He uses module.exports(counter).

References

https://github.com/deshondixon/city-explorer https://www.youtube.com/watch?v=xHLd36QoS4k https://www.freecodecamp.org/news/javascript-modules-explained-with-examples/#:~:text=A%20module%20in%20JavaScript%20is,object%20accessible%20to%20other%20modules