Live output
Editable code
Press Esc to move focus away from the code area (Tab inserts a tab character).
const list = document.querySelector('.output ul'); list.innerHTML = ''; const greetings = ['Happy Birthday!', 'Merry Christmas my love', 'A happy Christmas to all the family', 'You\'re all I want for Christmas', 'Get well soon']; for (let greeting of greetings) { // Your conditional test needs to go inside the parentheses // in the line below, replacing what's currently there if (greeting) { const listItem = document.createElement('li'); listItem.textContent = greeting; list.appendChild(listItem); } }