fix(curriculum): description of music player step 61 (#53799)

Co-authored-by: Huyen Nguyen <25715018+huyenltnguyen@users.noreply.github.com>
This commit is contained in:
Mikey Esteban
2024-02-20 16:11:50 +01:00
committed by GitHub
co-authored by Huyen Nguyen
parent c981711169
commit e78ce92e9a
@@ -18,9 +18,9 @@ const element = document.getElementById('example');
console.log(element.textContent); // Output: This is some text content
```
Use a `ternary` operator to check if `currentTitle` is truthy. If so, implicitly return `currentTitle` otherwise implicitly return an empty string. Assign this result to `playingSong.textContent`.
Use a ternary operator to check if `currentTitle` evaluates to a truthy value. If it does, set `playingSong.textContent` to `currentTitle`. Otherwise, set it to an empty string.
Then, use a `ternary` operator to check if `currentArtist` is truthy. If so, implicitly return `currentArtist` otherwise implicitly return an empty string. Assign this result to `songArtist.textContent`.
Then below that, use a `ternary` operator to check if `currentArtist` is truthy. If so, set `songArtist.textContent` to `currentArtist`. Otherwise, set it to empty string.
# --hints--