Test case name | Result |
---|---|
typeof x === "undefined" | |
x === undefined | |
x == undefined | |
x == null | |
!x |
Test name | Executions per second |
---|---|
typeof x === "undefined" | 13208730.0 Ops/sec |
x === undefined | 4919502.0 Ops/sec |
x == undefined | 4981228.0 Ops/sec |
x == null | 13932450.0 Ops/sec |
!x | 13954640.0 Ops/sec |