Nullish coalescing vs logical OR

Benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
logical OR
var a = undefined || 5;
ready
Nullish coalescing
var a = undefined !== null && undefined !== void 0 ? undefined : 5;
ready

Revisions

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