Change:
# --description-- <del> Before playing the song, you need to make sure it starts from the beginning. This can be achieved by the use of the `currentTime` property of the `audio` object. </del> <ins> Before playing the song, you need to make sure it starts from the beginning. This can be achieved by the use of the `currentTime` property on the `audio` object. </ins> <del> Add an `if` statement to check whether the `userData?.currentSong` is `null` or if `userData?.currentSong.id` is strictly not equal `song.id`. Inside `if` block, set the `currentTime` property of the `audio` object to `0`. </del> <ins> Add an `if` statement to check whether the `userData?.currentSong` is falsy *OR* if `userData?.currentSong.id` is strictly not equal `song.id`. This condition will check if no current song is playing or if the current song is different from the one that is about to be played. Inside `if` block, set the `currentTime` property of the `audio` object to `0`. </ins> # --hints-- <del> You should create an `if` statement with the condition `userData?.currentSong === null || userData?.currentSong.id !== song.id`. </del> <ins> You should create an `if` statement with the condition `userData?.currentSong === null || userData?.currentSong.id !== song.id`. Don't forget to include optional chaining. </ins> ```js <del> assert.match(code, /ifs*(s*userData?.currentSongs*===s*nulls*||s*userData?.currentSong.ids*!==s*song.ids*)s*{s*/) </del> <ins> assert.match(code, /ifs*(s*(?:(?:!userData?.currentSong|s*userData?.currentSongs*===s*null)s*||s*userData?.currentSong.ids*!==s*song.ids*|s*userData?.currentSong.ids*!==s*song.ids*||s*(?:!userData?.currentSong|s*userData?.currentSongs*===s*null))s*)s*{/) </ins> ``` You should set `audio.currentTime` to `0` inside your `if` block. ```js <del> assert.match(code, /ifs*(s*userData?.currentSongs*===s*nulls*||s*userData?.currentSong.ids*!==s*song.ids*)s*{s*audio.currentTimes*=s*0s*;?s*}/) </del> <ins> assert.match(code, /ifs*(s*(?:(?:!userData?.currentSong|s*userData?.currentSongs*===s*null)s*||s*userData?.currentSong.ids*!==s*song.ids*|s*userData?.currentSong.ids*!==s*song.ids*||s*(?:!userData?.currentSong|s*userData?.currentSongs*===s*null))s*)s*{s*audio.currentTimes*=s*0s*;?s*}/) </ins> ``` # --seed--

Discussion:
There are a few grammar issues in this description. Plus the description can be broken up with spacing a little bit better for readability. Also the tests are looking for a specific answer of for the condition. But I don't see why we need to specifically check for when either of these options would be valid The tests should be more flexible to allow any valid answer. Also, order shouldn't matter here because we want to test that campers understand the concept. Not forcing a particular order here. This should pass but currently doesn't see explanation above see explanation above No response Device: [e.g. iPhone 6, Laptop] OS: [e.g. iOS 14, Windows 10, Ubuntu 20.04] Browser: [e.g. Chrome, Safari] Version: [e.g. 22] No response
There's slight issue with this. If the concept in this step is using the , in a way where order doesn't matter, this is not the best example. Second part is obsolete, there's no way that could be when it is reached in this order. It will always be . If is , then second part is skipped by definition. If is , because it didn't throw (see below) then must exists, therefore cannot beIt can throw error. The point of using in the condition above (where second condition depends on the first one) is that the second part is checked only when first part is . In this case it means that is not , so it is possible to check what is the value of . Otherwise, when is , will throw error:What about ? (notice the second question mark in the first part). Well... the second condition is then again obsolete.
If order does matter then the directions need to specify that. Otherwise, campers will not understand why this should be allowed to pass either an update needs to be to the directions on hint text. Or both.
Despite of using the logical OR, order in this statement is important, as depends on the existence of . What do you think?
I like it. I would just change the first part to this