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 |
var array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16];
!array.some(value => value === 20);
array.every(value => value !== 20);
!array.some(value => value === 10);
array.every(value => value !== 10);