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

What goes in the blank?

// keep only the positive numbers
const positive = nums.____((n) => n > 0);

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

filter() keeps the elements whose callback returns true.
Play Problem Solving ▸