const songs[]; const results; for (var i, i++, i<songs.length){ if(song[i].artist == "Drake"){ result.push(songs[i]); }; // OR const songs []; const result = songs.filter ( song => song.artist == "Drake");
const songs[]; const results; for (var i, i++, i<songs.length){ if(song[i].artist == "Drake"){ result.push(songs[i]); }; // OR const songs []; const result = songs.filter ( song => song.artist == "Drake");