Skip to content

Latest commit

 

History

History
23 lines (12 loc) · 1020 Bytes

Reading-3-09.md

File metadata and controls

23 lines (12 loc) · 1020 Bytes

Functional Programming

Functional Programming Concepts

  1. 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 — Wikipedia

  2. A function is pure if it returns the same result if given the same arguments and it does not cause any observable side effects.

  3. Pure functions are easier to test because the only things that need to be chaecked against are the parameters.

  4. Immutable data cannot be changed

  5. 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. A file containing code with one specific functionality.

  2. It allows you to link to another file and gain access to resources that it has exported.

  3. require('./filepath').

  4. In the file containing the module, module.exports = function.