isString

Benchmark created by mvj3 on


Setup

var str1 = "I a String!";

Test runner

Ready to run.

Testing in
TestOps/sec
underscore
function isString(line1) {
  return toString.call(line1) === '[object String]';
}
isString(str1);
ready
array_access
function isString(line1) {
  return line1[0] != undefined;
}
isString(str1);
ready

Revisions

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