Hi people I am currently learning JS on the code academy classes but....I am stuck on a part where I just don't understand a certain exercise where I have to make a valor between a certain number for show something....I think the example will show what I have to do lol
var choixUtilisateur = prompt("Question");var choixOrdi = Math.random(1)console.log(choixOrdi)if (choixOrdi <= 0.33){ choixOrdie = "pierre";} else if(choixOrdi >= 0.34 && choixOrdi <= 0.66){ choixOrdie = "feuille";} else if(choixOrdi > 0.67 && choixOrdi <= 1) { choixOrdi = "ciseau";}for some reason this not works ...here the lesson I am on :
https://www.codecademy.com/courses/javascript-beginner-en-Bthev-mskY8/0/4?curriculum_id=506324b3a7dffd00020bf661
I hope you guys could help me...I block on this part 🙁
var choixUtilisateur = prompt("Question");var choixOrdi = Math.random(1)console.log(choixOrdi)if (choixOrdi <= 0.33){ choixOrdie = "pierre";} else if(choixOrdi >= 0.34 && choixOrdi <= 0.66){ choixOrdie = "feuille";} else if(choixOrdi > 0.67 && choixOrdi <= 1) { choixOrdi = "ciseau";}for some reason this not works ...here the lesson I am on :
https://www.codecademy.com/courses/javascript-beginner-en-Bthev-mskY8/0/4?curriculum_id=506324b3a7dffd00020bf661
I hope you guys could help me...I block on this part 🙁