“filtre en javascice” Réponses codées

Filtre le tableau JavaScript

var words = ['spray', 'limit', 'elite', 'exuberant', 'destruction', 'present'];

const result = words.filter(word => word.length > 6);

console.log(result);
White Browed Owl

filtre JavaScript

const arr = [1, 2, 3, 4, 5, 6, 7, 8, 9];

const filter = arr.filter((number) => number > 5);
console.log(filter); // [6, 7, 8, 9]

or 

const words = ['spray', 'limit', 'elite', 'exuberant', 'destruction', 'present'];

const result = words.filter(word => word.length > 6);

console.log(result);
// expected output: Array ["exuberant", "destruction", "present"]
Aggressive Albatross

filtre en javascice

const numbers = [5, 13, 7, 30, 5, 2, 19];
const bigNumbers = numbers.filter(number => number > 20);
console.log(bigNumbers);
//Output: [30]
Ariful Islam Adil(Code Lover)

Réponses similaires à “filtre en javascice”

Questions similaires à “filtre en javascice”

Parcourir les réponses de code populaires par langue

Parcourir d'autres langages de code