title: illegal use of break statement; javascript
body: <p>When this variable becomes a certain amount i want the loop to stop, but i keep getting the error, "Uncaught SyntaxError: Illegal break statement".</p>
  
  <pre><code>function loop() {
      if (isPlaying) {
          jet1.draw();
          drawAllEnemies();
          requestAnimFrame(loop);
          if (game==1) {
  
              break;
  
          }
  
      }
  } 
  </code></pre>