11. Review


#1

var loopCondition = false;

do {
console.log("I'm gonna stop looping 'cause my condition is " + loopCondition + "!");
} while (loopCondition);
var coinFace = Math.floor(Math.random() * 2);

while(coinFace === 0){
console.log("Heads! Flipping again...");
var coinFace = Math.floor(Math.random() * 2);
}
console.log("Tails! Done flipping.");
for(i = 1; i > 5; i); }


#2

What is your question or what is this supposed to be? And what do you intend to do here?

for(i = 1; i > 5; i); }

First of all it will probably produce an error because of a closing } without an opening one but more important what should it have done if it would work?