diff --git a/projetjavascript.html b/projetjavascript.html index 5c1bd60..298bc5e 100644 --- a/projetjavascript.html +++ b/projetjavascript.html @@ -9,7 +9,7 @@ var jeton_bac=1000; var jeton_joueur=99; function lancement() { var nb_jet = document.getElementById("name").value; - if (jeton_joueur > nb_jet && jeton_bac > 500 && nb_jet < 100 && nb_jet> 0){document.write(11);} + if (jeton_joueur > nb_jet && jeton_bac > 500 && nb_jet < 100 && nb_jet> 0){document.write(11);nbAlea();} else{document.write("tu as mis trop de jetons");} } @@ -19,9 +19,9 @@ function nbAlea(){ const cars = [Math.floor(Math.random() * 10) , Math.floor(Math.random() * 10) , Math.floor(Math.random() * 10) ]; -document.write(cars); +window.alert(cars); } -nbAlea(); +