title: Javascript -- missing semicolon (no)
body: <p>I have the following code:</p>
  
  <pre class="lang-js prettyprint-override"><code>...
  
  function sleep(ms) {
      return new Promise(resolve =&gt; setTimeout(resolve, ms));
  }
  
  async function refreshField() {
      var c = null;
      while (c == null) {
          c = document.getElementById("textbox");
          await sleep(10);
      }
      var lines = c.value.split("\n");
  
      cells = new Cartesian();
  
      for (var i in lines) {
          var line = lines[i];
          var pts = line.trimRight().split(" ").map(Number).filter(function(x) { return !isNaN(x); });
          for (var j = 0; j + 1 &lt; pts.length; j += 2) {
              cells.add([pts[j], -pts[j + 1]]);
          }
      }
  
      fieldDrawEvent = setTimeout(drawField, 10);
  }
  
  ...
  </code></pre>
  
  <p>It works properly in chromium and opera, while in firefox 41.0.2 it says that a semicolon is missing right after the "async" word. I can't figure out why. The rest of the code is not so important, I guess, but I can't be sure. Can you help me to locate the error?</p>
  
  <p>Btw, it also works fine in firefox 53.0.3.</p>