JSFiddle - React, Tailwind, and code Playground

HTML

Look in the console.

JavaScript

function build(length) {
  const a = [];
  while (a.length < length) {
    a[a.length] = Math.random();
  }
	return a;
}
let n;
try {
  for (n = 100000; n < 500000; n += 1000) {
    console.log(`Trying ${n}`);
    console.log(Math.max(...build(n)));
  }
} catch (e) {
	console.log(`Failed at ${n}: ${e.message}`);
}