Most efficient way to generate a really long string (tens of megabytes) in JS August 28, 2023 by Tarik For ES6: 'x'.repeat(10*1024*1024)