title: Extending Math object through prototype doesn't work
body: <p>I try to extend JavaScript <code>Math</code>. But one thing surprised me.</p>
  
  <p>When I tried to extend it by <code>prototype</code></p>
  
  <pre><code>Math.prototype.randomBetween = function (a, b) {
      return Math.floor(Math.random() * (b - a + 1) + a);
  };
  </code></pre>
  
  <p>In console I have error 'Cannot set property 'randomBetween' of undefined' ...</p>
  
  <p>But if I asigne this function to <code>Math.__proto__</code></p>
  
  <pre><code>Math.__proto__.randomBetween = function (a, b) {
      return Math.floor(Math.random() * (b - a + 1) + a);
  };
  </code></pre>
  
  <p>Then everything works fine.</p>
  
  <p>Can anybody explain me why it works in this way? I appreciate any help.</p>