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 trialPaul Dieter
1,569 PointsHaving trouble following along in the workspace
I am following along and typing out the code the teacher has in the video, but when I input the number of HTML and CSS badges I have, the console won't calculate it after. The teacher inputs '10' and '5' to get 105, but I get nothing.
Here is my code:
var htmlBadges = prompt('How many HTML badges do you have?');
var cssBadges = prompt('How many CSS badges do you have?');
var totalBadges = htmlBadges + cssBages;
alert('Wow! You have ' + totalBadges + ' badges');
1 Answer
Jennifer Nordell
Treehouse TeacherHi there, Paul! You're doing great, but you have a teensy typo that is causing a syntax error. In one place you misspelled "Badges".
You wrote:
// note cssBages
var totalBadges = htmlBadges + cssBages;
But you meant to write:
// note cssBadges with a "d" in the middle
var totalBadges = htmlBadges + cssBadges;
Hope this helps!