Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36
Chrome 129
Mac OS X 10.15.7
Desktop
3 months ago
Test name Executions per second
Some (Non-Existing Value) 28163228.0 Ops/sec
Every (Non-Existing Value) 28462178.0 Ops/sec
Some (Existing Value) 30505764.0 Ops/sec
Every (Existing Value) 30171334.0 Ops/sec
Script Preparation code:
AخA
 
var array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16];
Tests:
  • Some (Non-Existing Value)

     
    !array.some(value => value === 20);
  • Every (Non-Existing Value)

     
    array.every(value => value !== 20);
  • Some (Existing Value)

     
    !array.some(value => value === 10);
  • Every (Existing Value)

     
    array.every(value => value !== 10);