Do/while loops


#1



I am trying to code a Do/While loop but I am having problems.

var count = 0;

var getToDaChoppa = function(){
do {console.log("Im hoping this all sinks in soon!"); {
while(count < 5);
}
}

getToDaChoppa();

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

SyntaxError: Unexpected identifier

Replace this line with your code.


#2

@leximi2002

Hi,

There should be a closing curly brackets } for your do but instead you putted an opening curly bracket { here

This is to close the do so we can pass to the while loop.

P.S. Your Do/WHILE loop is generating an infinite loop. Try putting a condition evaluated as false in your while loop.