Includes multiple (v2)

Revision 2 of this benchmark created on


Setup

const opt = {
	textContent: 'cart.js'
}

Test runner

Ready to run.

Testing in
TestOps/sec
Multi-condition
opt.textContent && opt.textContent.includes('Network request') && opt.textContent.includes('cart.js')
ready
Inline nullish check
opt.textContent?.includes('Network request') && opt.textContent?.includes('cart.js')
ready
Array condition
['Network request', 'cart.js'].includes(opt.textContent)
ready

Revisions

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