1var words = ['spray', 'limit', 'elite', 'exuberant', 'destruction', 'present'];
2
3const result = words.filter(word => word.length > 6);
4
5console.log(result);
1const words = ['spray', 'limit', 'elite', 'exuberant', 'destruction', 'present'];
2
3const result = words.filter(word => word.length > 6);
4
5console.log(result);
6// expected output: Array ["exuberant", "destruction", "present"]
1const numbers = [2, 4, 5, 3, 8, 9, 11, 33, 44];
2const filterNumbers = numbers.filter((number) => number > 5);
3console.log(filterNumbers)
4//Expected output:[ 8, 9, 11, 33, 44 ]
1const arr = [1, 2, 3, 4, 5, 6, 7, 8, 9];
2
3const filter = arr.filter((number) => number > 5);
4console.log(filter); // [6, 7, 8, 9]
5
1const filterArray=(a,b)=>{return a.filter((e)=>{return e!=b})}
2
3let array = ["a","b","","d","","f"];
4
5console.log(filterArray(array,""));//>> ["a","b","d","f"]