To learn it, you gotta 'do' it: why does this work?


#1

<PLEASE USE THE FOLLOWING TEMPLATE TO HELP YOU CREATE A GREAT POST!>

<Below this line, add a link to the EXACT exercise that you are stuck at.>

<In what way does your code behave incorrectly? Include ALL error messages.>
Hi my code passes and seems to be correct. I’m just not sure why. Could anyone explain why and how this works? From what i can understand its saying console.log GET TO DA CHOPPA while it is false. But what is false to make this work and what stops it from running?

```

var getToDaChoppa = function(){
do{
console.log(“GET TO DA CHOPPA”);

 }
  while(0);

};

getToDaChoppa();

<do not remove the three backticks above>

#2

@jason2921

#First

You create a function called getToDaChoppa with no parameters.

#Second

It logs to the console GET TO DA CHOPPA once.

#Third

It stops doing it because of the 0.


#3

Cool, that makes sense thank you.