hasOwnProperty VS !== undefined (v2)

Revision 2 of this benchmark created on


Setup

const myObj = {
	test: 0
}
const testKey = "test"

Test runner

Ready to run.

Testing in
TestOps/sec
hasOwnProperty
return myObj.hasOwnProperty(testKey)
ready
!== undefined
return myObj[testKey] !== undefined
ready

Revisions

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