10/11 need help


This is my code:

var getToDaChoppa = function(){
// Write your do/while loop here!
do {
console.log("GET TO THE CHOPPER!!");
} while (getToDaChoppa);

var getToDaChoppa = false;

The error is saying that there is something wrong with the loop syntax, I don't see any though.


You are declaring getToDaChoppa twice, the first time as a function and then reassigning it to a false, so getToDaChoppa() does not work because it's not a function anymore


Thanks for the help!


:thumbsup: You're welcome


How do you actually change it so it can work?


var getToDaChoppa = function () {
  i = 3;
  // execute the following at least once
  do {
    console.log('GET TO DA CHAPPA');
    i -= 1;
  } while (i > 0); // until the "while" condition is falsy