linkedin
behance
copy
arrow-up
Zone d'apprentissage
by Quazerty
Premiers pas
Blocs de construction
Introduction aux objets
JavaScript asynchrone
Les API côté client
var list = document.querySelector('.output ul'); list.innerHTML = ''; var 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 (var i = 0; i < greetings.length; i++) { var input = greetings[i]; // Your conditional test needs to go inside the parentheses // in the line below, replacing what's currently there if (greetings[i]) { var result = input; var listItem = document.createElement('li'); listItem.textContent = result; list.appendChild(listItem); } }