title: Javascript Prompt Validation?
body: <p>I want to prompt the user to enter a sport (baseball, football, soccer, or track). Let's say I enter "Golf". How do I get it to keep asking me to enter a sport until I enter one of the valid sports? The sport determines what field they play on. Below is my code. </p>
  
  <pre><code>var sport = prompt("What sport do you play? (Baseball, Football, Soccer, or Track)").toLowerCase (); 
  
  switch (sport) {
      case "baseball": 
          field = "Field 1";
          break;
      case "football": 
          field = "Field 2";
          break;
      case "soccer":
          field = "Field 3";
          break;
      case "track":
          field = "Field 4";
          break;
      default: alert("Please enter a valid sport");
  }
  </code></pre>