Pilih elemen array yang dimulai dengan huruf JavaScript tertentu

const countries = ['Norway', 'Sweden',  'Denmark', 'New Zealand'];

const startsWithN = countries.filter((country) => country.startsWith("N"));

console.log(startsWithN);

// Output: [ 'Norway', 'New Zealand' ]
ZeldaIsANerd