title: Javascript: How do I force a new tab to open after a quiz (in prompt) was solved wrong?
body: <p>I'm new to JavaScript and I'm curious about how do I force js to open a new tab if the quiz is solved wrong? The idea is to open a new tab with some information about the quiz so that the person could solve it correctly next time.</p>
  <p>First I tried using <strong>if</strong> and then I tried using <strong>while</strong>, but it doesn't work either:</p>
  <pre><code> while(score &lt; 3){
      function myFunction(){
          window.open(&quot;theory.html&quot;, '_blank');
      }
  </code></pre>
  <p>Thanks in advance!</p>