i'm trying to make do...while loop with reversed order and with "random step".
var estam = 100;
do
{
// some things, that can change variable "rd"
estam -= Math.floor((Math.random()*rd)+1)
}
while (estam < 1);
But browsers just perform do once.
I'm trying to get: "do something with some things and decrease variable estam accordingly to those things (and those some operations) as long as estam is bigger than zero".
Or i need to make ordinary loop with steps, and in each step check estam than jump out to function and back ?
while (estam < 1);is the conditional limit to break te loop. My mistake.