ReScript supports while loops. While loops execute its body code block while its condition is true.
while
A mutable binding can control whether a while loop continues.
while true { if Math.random() > 0.3 { break } else { Console.log("Still running") } }
Control flow