What is functional programming?
A programming paradigm that emphasizes on the use of functions to perform computations and avoids changing state and mutable data.
What is a pure function and how do we know if something is a pure function?
A pure function is a function that always returns the same output for a given input and does not have any side effects, such as modifying a variable outside its scope.
What are the benefits of a pure function?
Predictability, testability, reusability, and avoiding programming pitfalls such as race conditions and unexpected behavior.
What is immutability?
Immutability is the characteristic of an object or data structure that cannot be modified after creation.
What is Referential transparency?
Referential transparency is the property of a function that always returns the same output for a given input.
What does componentDidMount do?
componentDidMount is a React lifecycle method that is invoked immediately after a component is mounted.
What is a module?
A module is a self-contained unit of code that can be reused and imported into other code.
What does the word ‘require’ do?
‘require’ is a function used in Node.js to load and import external modules.
How do we bring another module into the file the we are working in?
We use the ‘import’ keyword followed by the name of the module to bring it into the current file.
What do we have to do to make a module available?
To make a module available, we must export it using the ‘export’ keyword followed by the module name.