title: Assigning multiple variables from a looping prompt input in Javascript?
body: <p>I'm writing a very simple program, which asks for a number of names depending on how many tickets are needed. I cannot find a way to change the variable that the prompt input is assigned to every time the loop runs. Is there a way to do this? Below is the current loop I'm using. </p>
  
  <pre><code>while (ticketsNeeded != 0) {
          name = prompt("Enter the name of attendee #" + ticketsNeeded);
          ticketsNeeded--;
      }  
  </code></pre>
  
  <p>For example, if three tickets are needed, the user will be prompted for three different names; however, they are all saved to the same variable and I'd like to have them uniquely assigned so I can later use them. </p>