Tell us what’s happening:
This is how I tried to solve the ternary question but for some reason It still not passing.
I tried many different ways but still not working
- currentTitle ? playingSong.textContent = currentTitle: “”
- const innerText = currentTitle ? playingSong.textContent = currentTitle: “”
playingSong.textContent = innerText - currentTitle !== undefined ? playingSong.textContent = currentTitle: “”
- currenTitle != null ? playingSong.textContent = currentTitle: “”
Your code so far
<!-- file: index.html -->
/* file: script.js */
// User Editable Region
const c = !currentTitle ? currentTitle: ""
playingSong.textContent = c
currentTitle ? playingSong.textContent = currentTitle: ""
// User Editable Region
/* file: styles.css */
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36
Challenge Information:
Learn Basic String and Array Methods by Building a Music Player - Step 70