Javascript Flashcards
What are the 3 main types of Scope?
- Global Scope
- Block Scope
- Function Scope
Does map() return a new array?
Yes
What is a Higher Order Function?
A higher order function is a function that takes a function as an argument, or returns a function.
What is Currying?
Currying is a technique of evaluating a function with multiple arguments, into a sequence of function with a single argument.
In My Words:
Currying is when you take a function with multiple arguments and divide those arguments over multiple functions within the same function.
What is closure?
A closure is a feature in JavaScript where an inner function has access to the outer (enclosing) function’s variables — a scope chain.
What is Functional Programming?
Is when you use Pure Functions almost exclusively.
What is a Pure Function?
- Given the same input, will always return the same output.
- Produces no side effects.
What is Global Scope?
Global Scope is anything defined outside of any code block.
What is Local Scope?
Local Scope is anything defined inside of a code block.
Describe map()
The map() method creates a new array of results using a function on each element of the array.