What goes in the blank?
// keep only the positive numbers const positive = nums.____((n) => n > 0);
Answer: filter
filter() keeps the elements whose callback returns true.
Play Problem Solving ▸
// keep only the positive numbers const positive = nums.____((n) => n > 0);
Answer: filter