title: Are there multiple implementations of Uint8Array?
body: <p>Are there different implementations of <code>Uint8Array</code>? This chunk of code behaves differently in Safari and Chrome/FF:</p>
  
  <pre><code>var x = new Uint8Array(3);
  x.fill(128);    // Safari 9: "TypeError: x.fill is not a function. (In 'x.fill(128)', 'x.fill' is undefined)"
  console.log(x); // Chrome 47 and FF 43 print "[128, 128, 128]"
  </code></pre>
  
  <p>I'm confused by differing online descriptions of <code>Uint8Array</code>. Mozilla Developer Network describes the <code>fill()</code> method here: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/fill" rel="nofollow">https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/fill</a> . But Java Scripture makes no mention of <code>fill()</code> as a method: <a href="http://www.javascripture.com/Uint8Array" rel="nofollow">http://www.javascripture.com/Uint8Array</a> . </p>
  
  <p>How can I initialize a <code>Uint8Array</code> in Safari?</p>
  
  <p>What am I missing here?</p>