What is wrong with my syntax?


#1

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


My code only shows up on the screen with this message: SyntaxError: Unexpected token }

here is my code :
var x = false

var getToDaChoppa = function(){
  // Write your do/while loop here!
  do{
      console.log("im really bored")
    }
}; while(x)
getToDaChoppa();

#2

HI you put the while(x) outside the function


#3

ok it worked. thanks a ton!


#4

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