const arr = ['pine', 'apple', 'pineapple', 'ball', 'roll']; const longWords = arr.filter(item => item.length > 5); console.log(longWords); // ['pineapple']