reading-notes

Functional Programming Concepts

What is functional programming?

functional programming is a programming paradigm — a style of building the structure and elements of computer programs.

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.

What are the benefits of a pure function?

The code’s definitely easier to test. We don’t need to mock anything.

What is immutability?

Unchanging over time or unable to be changed.

What is Referential transparency?

if a function consistently yields the same result for the same input.

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

What is a module?

is just essentially anther javascript files

What does the word ‘require’ do?

include modules that exist in separate files.

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

using ‘require’ function.

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

do same module export equal to what ever we want to be made.