JSFiddle - React, Tailwind, and code Playground
JavaScript
let i = 0;
while (true) {
i++;
let test = (4 * Math.random()).toFixed(15);
let assertion = String(Math.PI);
if (test === assertion) {
alert(i + " iterations!");
}
}
let i = 0;
while (true) {
i++;
let test = (4 * Math.random()).toFixed(15);
let assertion = String(Math.PI);
if (test === assertion) {
alert(i + " iterations!");
}
}