To learn it, you gotta 'do' it


#1


I don't understand how to use do/while loop in this lesson. Could you guys help me please?

https://www.codecademy.com/en/courses/javascript-beginner-en-ASGIv/2/3?curriculum_id=506324b3a7dffd00020bf661



#2

Have you had a go at it? If so can you please copy and paste your code?


#3

var getToDaChoppa = function() {
do {
console.log("Ya Gotta");
}while(getToDaChoppa)
getToDaChoppa = false;
}

getToDaChoppa()

Now I get stuck here. Could you help me? It's an infinite loop


#4

You should try something like this.

while(getToDaChoppa === true)

#5

thank you so much!! I did it


#6

didn't they previously teach that leaving out " === true" and just putting the variable in parentheses is the same thing? why should that change the result?


#7

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.