array check

Benchmark created on


Setup

const vals = [{}, [], null, '', 1, true]

Test runner

Ready to run.

Testing in
TestOps/sec
constructor
vals.map(obj => obj?.constructor === Array)
ready
isArray()
vals.map(obj => Array.isArray(obj))
ready
instanceof
vals.map(obj => obj instanceof Array)
ready

Revisions

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