String generation

Benchmark created on


Setup

let first = 'First'
let second = undefined
let third = 'third'

Test runner

Ready to run.

Testing in
TestOps/sec
String interpolation
const result = `${first ?? ''} ${second ?? ''} ${third ?? ''}`
ready
Array join
const result = [first, second, third].join(' ')
ready
String concat
const result = (first ?? '') + ' ' + (second ?? '') + ' ' + (third ?? '')
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.