Why this topic matters as it relates to the material I am studying:
What is functional programming? Functional programming is a programming paradigm 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? A pure function is a function that has no side effects and always returns the same result if the same arguments are passed in. We can tell if something is a pure function if it returns the same result every time it is called with the same arguments and does not cause any observable side effects.
What are the benefits of a pure function and how do we know if something is a pure function? The benefits of a pure function are that it is easier to test, easier to debug, and easier to reason about. We can tell if something is a pure function if it returns the same result every time it is called with the same arguments and does not cause any observable side effects.
What is immutability? Immutability is when data is immutable, or unchangeable.
What is a referential transparency? Referential transparency is when a function consistently yields the same result for the same input.
What is a module? A module is a file that contains code that can be imported into another file.
What does the word ‘require’ do? The word require is used to import a module into another file.
How do we bring in another module into the file that we are working in? We bring in another module into the file that we are working in by using the require keyword.
What do we have to do to make a module available? We have to export the module using the module.exports keyword.