Choose the array size and click Run button. An array of random integer numbers ranging from 0 to [array size] will be generated. To get the largest number within the array, the first attempt is using a for loop, then an optimized version of this same algorithm and last but not least using Math.max.
Array size:
| Array creation: | 0 | ms |
| For loop: | 0 | ms |
| Optmized for: | 0 | ms |
| Math.max: | 0 | ms |