title: how much data can javascript in the browser hold?
body: <p>I have created a JSFiddle to see how much data I can push into my browser. </p>
  
  <p>The link is <a href="http://jsfiddle.net/GWxAk/" rel="noreferrer">http://jsfiddle.net/GWxAk/</a></p>
  
  <p>The code is simple. It's just trying to push as many strings as possible into an array. 
  The strings have an approximate length of 300-310 characters. </p>
  
  <p>My question is: 
  does the result depend on how much memory I have got on my PC ?
  does it really differ browser to browser ? </p>
  
  <p>For instance if I have 8gb of ram will I get much more then if I have 4gb ?</p>
  
  <pre><code>var s = '';
  for (var i = 0; i &lt; 300; i++) {
      s += 'a';
  }
  
  array = [];
  count = 0;
  
  function doMore() {
      for (var i = 0; i &lt; 1000; i++) {
          count++;
          array.push(s + count);
      }
  };
  
  function repeat() {
      doMore();
      document.body.innerHTML = 'size:' + array.length;
      setTimeout(repeat, 100);
  }
  
  repeat();
  </code></pre>
  
  <p>In my case  chrome hangs at 14850000 and I have 4gb of ram
  That is an array of almost 15 million items. Not bad I guess</p>
  
  <p>Do you guys get the same ?
  Can somebody tell how to give as much memory as possible to the browser</p>
  
  <p>Thanks</p>