Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36
Chrome 85
Windows
Desktop
4 years ago
Test name Executions per second
let 207665.0 Ops/sec
const 206911.5 Ops/sec
var 206927.3 Ops/sec
Tests:
  • let

    AخA
     
    let aaa = [1];
    let count= 1;
    for(let i=1; i<1000; i++){
      aaa.push(aaa[i-1]+1);
      count*=i/2;
    }
  • const

     
    const aaa = [1];
    let count= 1;
    for(let i=1; i<1000; i++){
      aaa.push(aaa[i-1]+1);
      count*=i/2;
    }
  • var

     
    var aaa = [1];
    let count= 1;
    for(let i=1; i<1000; i++){
      aaa.push(aaa[i-1]+1);
      count*=i/2;
    }