Home »
MCQs »
Lodash MCQs
Which of the following Lodash methods generates a new array by applying a function to each member of the existing array?
20. Which of the following Lodash methods generates a new array by applying a function to each member of the existing array?
- _.map()
- _.reduce()
- _.filter
Answer: A) _.map()
Explanation:
_.map() Lodash methods generate a new array by applying a function to each member of the existing array.