const choices = { choice0: false, choice1: false, choice2: false }; const getRandomChoice = (max) => { return Math.floor(Math.random() * max); } const setTrue = () => { let randValue = getRandomChoice(3); let key = `choice${randValue}` choices[key] = true; } setTrue(); // let userChoice = prompt("Quelle porte choisissez-vous ? 1, 2 ou 3 ? ", 2); if