JavaScript Introducing JavaScript Finishing the Game Wrapping It Up

Gedeon Bashimbe
Gedeon Bashimbe
1,009 Points

Adding life counter

I'm trying to add a life counter and have made changes in my code for it but it seems like there is something wrong with my code. When I try to preview it nothing comes up.s

4 Answers

KRIS NIKOLAISEN
PRO
KRIS NIKOLAISEN
Pro Student 46,124 Points

If you check the console you'll see 'Uncaught SyntaxError: Unexpected end of input' at the end of your code. Working backwards you'll find a closing bracket is missing.

    } else if (won) {
      winningMessage.text = "YOU WIN!!!";
    }
  } //<--- add this bracket

  function render() {

  }

};
diogorferreira
diogorferreira
16,186 Points

Could you send us the code so we can try help?

Gedeon Bashimbe
Gedeon Bashimbe
1,009 Points

It worked. Thanks a lot for the help. :)