title: How to convert UTF8 string to byte array?
body: <p>The <code>.charCodeAt</code> function returns with the unicode code of the caracter. But I would like to get the byte array instead. I know, if the charcode is over 127, then the character is stored in two or more bytes.</p>
  
  <pre><code>var arr=[];
  for(var i=0; i&lt;str.length; i++) {
      arr.push(str.charCodeAt(i))
  }
  </code></pre>