Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
is_array, is_string
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:124.0) Gecko/20100101 Firefox/124.0
Browser:
Firefox 124
Operating system:
Windows
Device Platform:
Desktop
Date tested:
2 years ago
Test name
Executions per second
is_array
1965609600.0 Ops/sec
is_string
1957260032.0 Ops/sec
Script Preparation code:
var array = ["H", "E", "L", "L", "O", "."]; var string = "Hello."; function is_array(array){ if(array.constructor === Array){ return true; } return false; } function is_string(string){ if(typeof string === "string"){ return true; } return false; }
Tests:
is_array
is_array(string);
is_string
is_string(string);