Compare ways to iterate over object properties.
const obj = {};
for(let i=0; i<1000; i++) obj['key'+i] = i;Initializing...
| Test Case | Ops/sec | |
|---|---|---|
| Object.keys() | | ready |
| Object.entries() | | ready |
| for...in loop | | ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.