title: Different Javascript behavior between Chrome/iOS and Chrome/MacOS
body: <p>Loading this page <a href="http://malt.chat/x.html" rel="nofollow noreferrer">http://malt.chat/x.html</a> on Chrome/macOS displays &quot;Hello, it works&quot;</p>
  <p>Loading this page on Chrome/iOS displays &quot;ReferenceError: Cannot find variable: Two&quot;</p>
  <p>Why?</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-html lang-html prettyprint-override"><code>&lt;div id=hello&gt;&lt;/div&gt;
  
  &lt;script&gt;
    class One {
      static one() {
        document.getElementById("hello").innerHTML = "Hello, it works";
      }
    }
    class Two {
      static two() {
        One.one();
      }
      // removing this line eliminates the ReferenceError in iOS
      static s = 10;
    }
  &lt;/script&gt;
  
  &lt;script&gt;
    try {
      Two.two();
    } catch (err) {
      document.getElementById("hello").innerHTML = err;
    }
  &lt;/script&gt;</code></pre>
  </div>
  </div>
  </p>