title: How to write javascript equivalent of Convert.ToBase64String() in javascript?
body: <p>I have byte array and I can convert this usin Convert.ToBase64String() method in c#.
  I wrote equivalent of this method in javascript like below. But the result is different.</p>
  
  <p>in c#:</p>
  
  <pre><code> byte[] data = ...
  Convert.ToBase64String(data)
  </code></pre>
  
  <p>in js</p>
  
  <pre><code>    function GetStringFromByteArray(array) {
          var result = "";
          for (var i = 0; i &lt; array.length; i++) {
              for (var j = 0; j &lt; array[i].length; j++)
                  result += String.fromCharCode(array[i][j]);
          }
          return result;
      }
  </code></pre>
  
  <p>How can I succeed this in js?</p>