title: Javascript: Maximum String length Chrome
body: <p>in some other post I found that there should be limitation like 512mb (~2^27) for the maximum string length in javascript. I have the following code in my application:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>i = 1;
  selectionField.value = i;
  i++;
  for (i;i&lt;=tableEntries;i++){
  selectionField.value = selectionField.value + "," + i;
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>whereby "tableEntries" is e.g. "40000". This code executes fine in Firefox (though it takes around 5-10 seconds and prompts with a warning for a long running script) but does not execute in chrome. Chrome just interupts in this loop and says it cannot display the page. Is there a particular setting in chrome that can lead to this unexpected result? I mean the final string should have a length of ~240k chars. This should be fine according to the limit mentioned at the beginning.</p>
  
  <p>Thanks for help in advance!</p>