$ ./guess_the_languageProblem Solving — fill the blank
Problem Solving — fill the blank · easy · #110

What goes in the blank?

// returns only numbers greater than 10
function bigOnes(nums) {
  return nums.____(n => n > 10);
}
// bigOnes([5,15,20]) -> [15,20]

Answer: filter (also accepted: filter, filter())

filter() keeps only elements that pass the test.
Play Problem Solving ▸