in vs typeof

Benchmark created on


Setup

const methodName = 'with';

Test runner

Ready to run.

Testing in
TestOps/sec
in
methodName in Array.prototype;
ready
typeof
typeof Array.prototype[methodName] !== 'undefined';
ready

Revisions

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