(max)
| 8 | |
| 9 | const commands = { |
| 10 | async square_sum(max) { |
| 11 | await sleep(Math.random() * 100); // <3> |
| 12 | let sum = 0; for (let i = 0; i < max; i++) sum += Math.sqrt(i); |
| 13 | return sum; |
| 14 | }, |
| 15 | async fibonacci(limit) { |
| 16 | await sleep(Math.random() * 100); |
| 17 | let prev = 1n, next = 0n, swap; |