Q. Which method is used to loop over an array and create a new array with the results?

  • (A) map()
  • (B) forEach()
  • (C) filter()
  • (D) reduce()
πŸ’¬ Discuss
βœ… Correct Answer: (A) map()
Explanation: map() creates a new array by applying a function to each element.
Explanation by: Mr. Dubey
map() creates a new array by applying a function to each element.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
81
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
91%
Success Rate