Test name | Executions per second |
---|---|
Template Literal | 401.9 Ops/sec |
String Concatenation | 602.9 Ops/sec |
Array.join() | 18.7 Ops/sec |
<!--your preparation HTML code goes here-->
const slug = '1234567890';
for (let i = 0; i < 1000000; i++) {
const url = `/${slug}.html`;
}
for (let i = 0; i < 1000000; i++) {
const url = '/' + slug + '.html';
}
for (let i = 0; i < 1000000; i++) {
const url = ['/', slug, '.html'].join('');
}