Includes vs conditional (v2)

Revision 2 of this benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
includes (first match)
var str = "abc";
var result = ["abc", "def"].includes(str);
ready
conditional (first match)
var str = "abc";
var result = (str === "abc" || str === "def");
ready

Revisions

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