10.To learn it, you gotta 'do' it


#1

Whats wrong with this code ./
I have passed this with other code ,i just wanted to know problem with this one.

var getToDaChoppa = function(lol)
{
do
{
console.log("Do");
}// Write your do/while loop here!
while(lol);
{
console.log("While");
lol = "false";
}
};

getToDaChoppa("true");


#2


As explained there the change of your condition needs to be inside the do/while loop and not after it. Also "true" and "false" are not the best conditions. If you have a look at this:
http://www.sitepoint.com/javascript-truthy-falsy/
you can see that all not empty strings are treated as true even if you use "false" so better use the real boolean values true and false instead.