Test name | Executions per second |
---|---|
rojnpU5J'); waitfor delay '0:0:15' -- | 1.0 Ops/sec |
wUmrLVWz | 1.0 Ops/sec |
wUmrLVWz | 1.0 Ops/sec |
wUmrLVWz | 1.0 Ops/sec |
wUmrLVWz | 1.0 Ops/sec |
wUmrLVWz | 1.0 Ops/sec |
arr = Array.from({length: 1000}, (_, i) => i);
const index_zero = arr[0];
console.log(index_zero);
const index_random = arr[Math.floor(Math.random() * arr.length)];
console.log(index_random);
const index_last = arr[arr.length - 1];
console.log(index_last);
const at_zero = arr.at(0);
console.log(at_zero);
const at_random = arr.at(Math.floor(Math.random() * arr.length));
console.log(at_random);
const at_last = arr.at(-1);
console.log(at_last);