boolean vs !!

Benchmark created on


Setup

let a = 'Hello'

Test runner

Ready to run.

Testing in
TestOps/sec
boolean
if (Boolean(a)) {
	console.log(1)
}
ready
!!
if (!!a) {
	console.log(1)
}
ready

Revisions

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