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 trialZhihao Wang
9,687 PointsHow does this not equal ten?
What am I doing wrong in this challenge task?
var ten = c * b + b;
1 Answer
Jason Anello
Courses Plus Student 94,610 PointsHi Zhihao,
That passes for me. Where did you put it in relation to the other code? Did you initially get it wrong and then corrected it? Try refreshing the challenge if that's the case.
Zhihao Wang
9,687 PointsZhihao Wang
9,687 PointsI put it right after var three with a correctly put comma.
I've redone the task a few times, still get error.
Jason Anello
Courses Plus Student 94,610 PointsJason Anello
Courses Plus Student 94,610 PointsMaybe it's a temporary glitch with the code challenge then. I literally copied and pasted your code into the challenge after passing task 1 and your code passed.
What error message are you getting?
Did you end the var three statement with a comma or a semicolon?
This passes through task 2 for me:
Of course, you may have something different for
var three
Zhihao Wang
9,687 PointsZhihao Wang
9,687 PointsI'll try again I guess.
** Update
It works now, must be a glitch **
Jason Anello
Courses Plus Student 94,610 PointsJason Anello
Courses Plus Student 94,610 PointsThe challenge doesn't seem to like doing it that way.
Check the code I previously posted.
Zhihao Wang
9,687 PointsZhihao Wang
9,687 PointsYea, I just used your version, weird how the comma glitches out that way. Thanks though.
Jason Anello
Courses Plus Student 94,610 PointsJason Anello
Courses Plus Student 94,610 PointsYou're welcome.
Your code worked in the console for me but not the challenge.