Check if array index out of bounds

Benchmark created by SiPlus on


Setup

var arr = ["qwe", "rty"];
  var res;

Test runner

Ready to run.

Testing in
TestOps/sec
Length
res = (2 < arr.length);
ready
Index
res = (arr[2] != null);
ready

Revisions

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

  • Revision 1: published by SiPlus on