Which of the following methods Reduces an array to a single value by applying a function to each element and aggregating the result?

18. Which of the following methods Reduces an array to a single value by applying a function to each element and aggregating the result?

  1. _.map()
  2. _.reduce()
  3. _.filter

Answer: B) _.reduce()

Explanation:

_.reduce() method Reduces an array to a single value by applying a function to each element and aggregating the result.

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.