Test name | Executions per second |
---|---|
String concatenation | 215045360.0 Ops/sec |
Concat method | 215769712.0 Ops/sec |
let str1 = '';
let str2 = '';
for (i = 0; i > 1000; i++) {
str1 += "random text. ";
}
for (i = 0; i > 1000; i++) {
str2 = str2.concat("random text. ");
}