Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36
Chrome 116
Windows
Desktop
one year ago
Test name Executions per second
check using length 13901081.0 Ops/sec
check using at() method 13914380.0 Ops/sec
Script Preparation code:
AخA
 
var arr = [1, 2, 3, 4]
Tests:
  • check using length

     
    var d = arr.length ===0
  • check using at() method

     
    var z = arr.at(-1)