truthyvstrue

Benchmark created by Kashyap Mukkamala on


Preparation HTML

<script>
       arr = [1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0];
   </script>

Test runner

Ready to run.

Testing in
TestOps/sec
truthy
if(arr.length) {
console.log('truthy')
}
ready
true
if(arr.length > 0) {
console.log('true')
}
ready

Revisions

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

  • Revision 1: published by Kashyap Mukkamala on