10. To learn it, you gotta do it


#1

var getToDaChoppa = function(){
// Write your do/while loop here!
i=1;
do {
console.log("I am Alex")
i++
};
while(i<3)
}
getToDaChoppa();

Can someone please tell me what's wrong?
thanks


#2

@codepro47817,

I believe that a "do-while" loop can't have a semi-colon " ; " at the end of the closing bracket " } " before the while.

do {
 console.log("I am Alex")
 i++
}; //<---
while(i<3)

#3

Wow! Thank you so much, I've been stuck on this for a while.