title: How to get out of an infinite prompt loop when the prompt is assigned to a variable
body: <p>Here's my code</p>
  
  <pre><code>function cc() {
    prompt("Choose Character") 
  }
  
  function cs() {
   var chars = setTimeout(function(){ cc() }, 3000);
    switch (chars) {
      case "spy":
      selectedspy()
      break;
      case "bulovian soldier":
      selectedbulovian()
      break;
      case "stonian soldier":
      selectedstonian()
      break;
      default:
      cs()
    }
  }
  </code></pre>
  
  <p>it keeps getting stuck in an infinite loop of asking the prompt again. I feel like I'm making a simple mistake, but I couldn't figure what I needed to type into google to get the answer</p>