const randomNumbers = [375, 200, 3.14, 7, 13, 852]; // Call .filter() on randomNumbers below const smallNumbers = randomNumbers.filter(numbers => { return numbers < 250; }); console.log(smallNumbers); const favoriteWords = ['nostalgia', 'hyperbole', 'fervent', 'esoteric', 'serene']; // Call .filter() on favoriteWords below const longFavoriteWords = favoriteWords.filter(words => { return words.length > 7; }); console.log(longFavoriteWords);
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter