getTodaChoppa is undefined. This will raise an exception.
In the second example,
var condition = false;
console.log ("Trying again");
condition is defined with a value that does not meet the while condtion, so the loop ends. The given code will be an infinite loop if
condition happens to be true since there is nothing inside the loop to change it. Scary programming.
var condition; // declaration
condition = false; // definition
console.log("Trying again... Not!");
} while (condition);
That is one of the beauties of
do..while, we can hand undefined variables into the loop, and define them as needs be, inside the loop. This will take on more meaning as you progress. In the meantime, take every precaution to think out your loops before you run them, and save your work first.