Compare 'in' operator vs hasOwnProperty.
const obj = { a: 1, b: 2, c: 3 };Initializing...
| Test Case | Ops/sec | |
|---|---|---|
| in operator | | ready |
| hasOwnProperty | | ready |
| undefined check | | ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.