reading-notes

Reading notes about code for my future reference.

View the Project on GitHub

Reading Assignment 9

Functional Programming Concepts

What is functional programming?

According to Wikipedia “Functional programming is 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 “

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

If it returns the same result if given the same arguments or does not cause observable side effects its can be determined as a pure function.

What are the benefits of a pure function?

The code is easier to test and its easy to test it’s pure functions with different contexts.

What is immutability?

Immutability is the fact that state cannot be changed after the fact that it had been created.

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

What is a module?

It is another JavaScript file.

What does the word ‘require’ do?

Require allows a path to be made via string to access a module.

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

Using the require keyword you bring in the function within a string and ‘/’ in the parethesis of the require.

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

module.export and make it equal to the variable I want to make available.

Back to Home