Test name | Executions per second |
---|---|
concat() | 1334.0 Ops/sec |
plus_operator | 1373.2 Ops/sec |
var string1 = "Hello ";
var string2 = " world!";
for(i = 0; i < 1000; i++) {
var message = string1.concat(string2);
}
for(i = 0; i < 1000; i++) {
var message = string1 + string2;
}