Unified Undefined

Benchmark created by Soulcyon on


Preparation HTML

<script>var a = "",
b = "valid";</script>

Test runner

Ready to run.

Testing in
TestOps/sec
Typeof false
typeof a != "undefined" ? a : "0";
ready
Typeof true
typeof b != "undefined" ? b : "0";
ready
Double bar false
 a || "0";
ready
Double bar true
b || "0";
ready
If false
a ? a : "0";
ready
If true
b ? b : "0";
ready

Revisions

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

  • Revision 1: published by Soulcyon on