title: Why is my rock paper scissors script in JavaScript not working
body: <p>I made a rock paper scissors script but everytime i click on 'pierre' only the first condition is showing even when he loses or tie.</p>
  
  <p>Here is my code. (rock = pierre, paper = papier, scissors = ciseaux)</p>
  
  <pre><code>let pierre = document.getElementById('pierre');
  let papier = document.getElementById('papier');
  let ciseaux = document.getElementById('ciseaux');
  let random = ['papier', 'pierre','ciseaux'];
  
  
  let choix = () =&gt;
     random[Math.floor(Math.random() * random.length)];
  
  
  
      pierre.onclick = function oui (){
          choix();
          console.log(choix());
          if(random[2]){
              pierre.style.background = ('green');
              ciseaux.style.background = ('red');
          }
          else if (random[0]){
              pierre.style.background = ('orange');
              ciseaux.style.background = ('orange');
          }
          else if (random[1]){
              pierre.style.background = ('red');
              ciseaux.style.background = ('green');
          };
      };
  
  
  </code></pre>