title: Do While loop - Simply add numbers
body: <p>I need to prompt the user to enter a series of numbers, or the word &quot;quit&quot;.
  Then, If the user enters a number, add the new number to a running total.
  And, If the user enters the word &quot;quit&quot; the loop should stop execution.
  I cant figure what should I do here. Im a beginner. i don't know how to make it work when user enter a word quit</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>let total = 0;
  let number = 0;
  do {
    total += number;
    number = parseInt(prompt('Enter a number: '));
    if (number &gt;= 0) {
      document.writeln("&lt;p&gt;You entered " + number + "!&lt;/p&gt;");
    } else {
      if (isNaN(number)) {
        number = parseInt(prompt('Enter a number: '));
        document.writeln("&lt;p&gt;Try again. We are looking for a number!&lt;/p&gt;");
      }
    }
  } while (number &gt;= 0)
  document.writeln("&lt;p&gt;The total is " + total + "&lt;/p&gt;")</code></pre>
  </div>
  </div>
  </p>