title: Bug with typeof null in JS V8 engine
body: <p>It seems that JS <a href="https://developers.google.com/v8/" rel="nofollow noreferrer">V8</a> engine <a href="https://github.com/v8/v8/commit/7dfb5beeec8821521beeb2b8eac36707a663064c" rel="nofollow noreferrer">has a bug</a>.</p>
  
  <p>As example you can execute this script in the Chrome console (<em>I use version 51.0.2704.103 m.</em>) and each time you will get random (at first glace) number of true and false values:</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>    function foo(){
          return typeof null === 'undefined';
      }
      
      for (var i = 0; i&lt;1000; i++) console.log(foo());</code></pre>
  </div>
  </div>
  </p>
  
  <p>For example:</p>
  
  <p><a href="https://i.stack.imgur.com/PyeHB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PyeHB.png" alt="enter image description here"></a></p>
  
  <p>On different OS / systems this bug appears on different iterations.</p>
  
  <p>I realize that this question has little practical sense, but I wonder <strong>what causes this strange behavior</strong> and <strong>depending on what changes the number of iterations</strong>?</p>
  
  <p>Also, what should be kept in mind when you write code using <code>typeof null</code> in case of this bug?</p>