Tell us what’s happening:
I tried doing this step 27 using strict equality operator and it didn’t work. Then I used loose equality operator and it worked.
I am just confused about why that happened. Can someone explain? Thanks.
Your code so far
<!-- file: index.html -->
/* file: styles.css */
/* file: script.js */
// User Editable Region
else {
if (userData.currentSong !== null && getNextSong() !== null) {
playSong(getNextSong().id)
}
if (userData.currentSong.id === allSongs.length - 1) {
userData.currentSong = null;
userData.songCurrentTime = 0;
pauseSong();
}
}
// User Editable Region
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.0.0 Safari/537.36
Challenge Information:
Build a Music Player - Step 27