Character Accessor

Benchmark created on


Description

Measures string.startsWith() against string[index]

Test runner

Ready to run.

Testing in
TestOps/sec
Bracket Accessor
const x = 'this is a string';

const y = x[0] === 't' ? 'We found t by accessor';

console.log({y});
ready
StartsWith
const x = 'this is a string';

const z = x.startsWith('t') ? 'We found t by startsWith';

console.log({z}).
ready

Revisions

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