Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialGedeon Bashimbe
1,026 PointsAdding 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
54,972 PointsIf 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
19,363 PointsCould you send us the code so we can try help?
Gedeon Bashimbe
1,026 PointsGedeon Bashimbe
1,026 PointsIt worked. Thanks a lot for the help. :)