Exercices de filtre à tableau JavaScript

function fiveAndGreaterOnly(arr) {
  return arr.filter(greater => greater>5);
}
// test
console.log(fiveAndGreaterOnly([3, 6, 8, 2])); /// [6, 8]
Adorable Alligator