Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
obj2 key exists
(version: 0)
Comparing performance of:
1 vs 2 vs 3
Created:
2 years ago
by:
Guest
Jump to the latest result
HTML Preparation code:
<div id="A">gfdgd</div> <p id="B">1234</p>
Script Preparation code:
var user = { name: 'John Doe', age: 30, email: 'johndoe@example.com' };
Tests:
1
console.log('name' in user);
2
console.log(user.hasOwnProperty('name'));
3
console.log(user.name !== undefined);
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (3)
Previous results
Fork
Test case name
Result
1
2
3
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
2 years ago
)
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36
Browser/OS:
Chrome 123 on Windows
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
1
57273.8 Ops/sec
2
55863.3 Ops/sec
3
55456.0 Ops/sec
Related benchmarks:
native find vs lodash _.find for object
native find vs lodash _.find vs ramda
native reverse find vs lodash _.findLast
find scope compare
taetas
Comments
Confirm delete:
Do you really want to delete benchmark?