reading-notes

Class 9 Notes

What is functional programming?

a style of programming where the elements are treated as mathematical functions

What is a pure function and how do we know if something is a pure function?

If it is deterministic and if it has no side effects

What are the benefits of a pure function?

It helps create clean code that is testable and reusable without worrying about uninteded side effets.

What is immutability?

unmodifiable data.

What is Referential transparency?

Basically it where you could replace the function with its value the result should be the same.

What is a module?

a reusable snippet of code.

What does the word ‘require’ do?

it searches for and loads modules to be used in Node.js

How do we bring another module into the file the we are working in?

we declare the variable a require(‘module’)

What do we have to do to make a module available?

you have to create an object using .exports

Things I want to know more about

I would like to learn more about modules and their frequency of use in real world applications.