The do while loop syntax is like this:
Example
do {
}while(conditions);
So a do-while loop with a nested if/else statement is like this:
do-while w/ nested if/else
do{
if() {
}
else {
}
}while();
Example w/ YOUR CODE
var temp = 110;
do {
if(temp >= 90)
{
console.log("Today's temperature is "+temp+"! "+"Lets go play ball");
{
else
{
console.log("Today's temperature is "+temp+"! "+"It is too hot today to play ball!");
}
temp--;
} while(temp > 90);
Okay now, let me explain what is happening here. What you are essentially doing is telling the compiler to do something until the while loop returns true. So, if you notice I changed temp -= 1; to temp--; it is exactly the samething it's just much more standard to use the latter. You were actually very close with your original code other than it is a do-while loop not a for-while. :)
forwithdo