The prompt states " Add an if statement to check whether the userData?.currentSong is falsy OR if userData?.currentSong.id is strictly not equal song.id."
Why is this? From my understanding both should work. Is there some lesson that I am missing? Is it just simply that if userData?.currentSong isn’t set it will be null? If so why phrase it as “check whether the userData?.currentSong is falsy”?
For this instruction, you must recall that ‘falsy’ is anything that evaluates to false.
So userData?.currentSong will not evaluate to false if it set to a value.
For eg. you could have written !userData?.currentSong and that would have been accepted as well.
That’s a face palm moment.
I think the lesson could be improved in some way by changing the hint for if someone does what I did.
Thank you for your reply!
I think it is best to make that suggestion on github where a developer can do something about it.
Please make your request here: GitHub Issues. Whenever reporting a bug, please check first that there isn’t already an issue for it and provide as much detail as possible.