Comment construire un menu à partir d'un tableau ?
choisir accepte aussi un tableau d'options :
menu est un tableau choix est un nombre menu ajoute 'Facile' menu ajoute 'Moyen' menu ajoute 'Difficile' choisir menu dans choix affiche 'Niveau choisi : ' + menu[choix - 1]
Le numéro renvoyé commence à 1, alors que le tableau commence à 0 : d'où le choix - 1.