title: While loop only running once in a draw() function (P5.js) (P5.play)
body: <p>I have a project that is due on the 27th, and I have a strange glitch. As you can see from the code, I have a while loop that sets a variable based on certain conditions. But if you look at the console, it keeps on saying that the variable is the same, no matter how different the variables it depends on are.</p>
  
  <p>This is my <strong>entire</strong> code:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var chance; // dont swap  |  swap
  var prizeDoor;
  var randomDoor;
  var randomDoor2;
  
  function setup() {
    chance = 50;
    createCanvas(1000, 1000);
  }
  
  function draw() {
    //setting up round
  
    prizeDoor = Math.round(random(1, 3));
  
    //choosing first door
  
    console.log("[1] [2] [3]");
    randomDoor = Math.round(random(1, 3));
  
    //showing user the door AI picks
  
    if (randomDoor == 1) {
      console.log(" ^");
      console.log(" |");
    } else if (randomDoor == 2) {
      console.log("     ^");
      console.log("     |");
    } else {
      console.log("         ^");
      console.log("         |");
    }
  
    console.log("AI chooses door #" + randomDoor + ".");
  
    //revealing a door
  
    //getting a number that isnt the players door or the prize door
    while ((!randomDoor2 == prizeDoor) || (!randomDoor2 == randomDoor)) {
      randomDoor2 = Math.round(random(1, 3));
    }
  
    //showing this to the user
    console.log("");
    console.log("Door #" + randomDoor2 + " does not have the prize.");
  }</code></pre>
  </div>
  </div>
  </p>