Introduction to while loops in JS 10/11


#1

var getToDaChoppa = function(){
do {
console.log("Get to da shoppa!!!")
while(getToDaChoppa){
}

};

getToDaChoppa();

//This is my function and I do not know of what I did incorrectly, help needed and thanks to those who help me


#2

You are using getToDaChoppa inside a loop inside getToDaChoppa before getToDaChoppa is defined. Also, the do-while syntax you are using is incorrect. Do-while syntax:

do {
    //Statements
}
while (CONDITION);

Also, please format your code.


#3

getToDaChoppa is defined, it is the name of the function but that is just for completion as it doesn't make it any better to use the function name as condition.