JSFiddle - React, Tailwind, and code Playground

by Damien M

JavaScript

var noms = '',
    nom,
    proceed = true;

while(proceed){
    
    nom = prompt('Entrez un nom');
    
    if(nom){
        noms += nom + ' '; //on met un espace a la fin
    }else{
        proceed = false;
    }
}
alert(noms);