<head>array fill</head>

<body>
    <script>
        let i = 0
        let a = 0.5;
        while ((a - 0.9) <= 0) {
            a = Math.random();
            i++;
            if ((a - 0.9) > 0) {
                break;
                //alert(i);
            }
        }
        alert(i);
    </script>
</body>