Functional Programming in JavaScript

Assess how well you understand map,filter,reduce,and immutability.

1. Which of the following is a core principle of functional programming in JavaScript?
2. Select all examples of higher-order functions in JavaScript.
3. A pure function in JavaScript always returns the same output given the same input and has no side effects.
4. What term refers to the process of combining two or more functions to produce a new function?
5. Which array method is used to create a new array with all elements that pass a test implemented by the provided function?
6. Which of the following are considered side effects in a JavaScript function?
7. In functional programming, it is recommended to use 'let' and 'var' to allow variables to be reassigned.
8. What is the process of breaking down a function that takes multiple arguments into a sequence of functions each taking one argument?
9. What does the 'reduce' method do in JavaScript?
10. Which of the following are immutable data structures in JavaScript by default?
11. The 'forEach' method returns a new array with the results of calling a function for each element.
12. What is the name of the function that is passed as an argument to another function?
13. Which functional programming technique involves breaking down a function that takes multiple arguments into a series of functions each taking one argument?
14. Which of the following are benefits of using pure functions in JavaScript applications?
15. Recursion is a functional programming technique where a function calls itself until a base condition is met.
16. What term describes a function that remembers the variables from the scope in which it was created, even after that scope has closed?
17. Which of the following is NOT a characteristic of functional programming in JavaScript?
18. Select all methods that return a new array instead of modifying the original array.
19. Referential transparency means that an expression can be replaced with its value without changing the program's behavior.
20. What array method is used to apply a function against an accumulator and each element in the array to reduce it to a single value?
Answered 0 of 0 — 0 correct