JS

JavaScript Code Output Challenge - filter method j...

19.

What will be the output of the following code?

const numbers = [1, 2, 3, 4, 5];
const filteredNumbers = numbers.filter(function(number) {
  return number > 2;
});
console.log(filteredNumbers);

[1, 2, 3, 4, 5]

[3, 4, 5]

[2, 3, 4, 5]

[1, 2]