Skip to content

Instantly share code, notes, and snippets.

@hotsphink
Created July 2, 2019 21:45
Show Gist options
  • Save hotsphink/ef054a35097c13c0238a097db8538b07 to your computer and use it in GitHub Desktop.
Save hotsphink/ef054a35097c13c0238a097db8538b07 to your computer and use it in GitHub Desktop.
mkgist-created gist
function makeExtensibleString() {
var s = "xxxxxxxx";
var t = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; // 31 characters
var r1 = t + s;
r1.match(/x/);
return r1;
}
function test() {
const s = makeExtensibleString();
const r = s + (s + s);
minorgc();
r.match(/x/);
}
test();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment