Q. Which array method returns a new array with only truthy values?

  • (A) filter()
  • (B) map()
  • (C) reduce()
  • (D) forEach()
πŸ’¬ Discuss
βœ… Correct Answer: (A) filter()
Explanation: filter() creates a new array with elements that pass a test.
Explanation by: Chandani
filter() creates a new array with elements that pass a test.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
89
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Chandani
Publisher
πŸ“ˆ
99%
Success Rate