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!
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 trial

slurpee
6,694 Pointscorrect = correct + 1; isn't doing anything
https://gyazo.com/a4fc239f44aeab750e1328e00e1c1889
the variable correct value isn't adding up + 1 if questions are answer correct? help please
3 Answers

Jennifer Nordell
Treehouse TeacherHi there, Angelo Doe! A good thing to keep in mind when learning to program is that just about everything is case-sensitive and I'm not kidding. Even files and folder names are case sensitive in many cases!
In two places in your code you have written toLowercase
instead of toLowerCase
. Note the capitalization of the C. Furthermore on each of these you have inadvertently omitted the parentheses following. They all should look similar to this: answer.toLowerCase() === 'answer';
.
Finally, you have both a capitalization and usage error in the when parsing an integer. You should be sending in the answer to the parseInt
function.
parseInt(finalQuestion) === 15
Hope this helps!

Steven Parker
225,769 PointsWhen calling a function or method (such as "toLowerCase"), the function/method name must be followed by parentheses even if no argument is being passed.
Also, the "parseInt" function is spelled with a lower-case "p" and it is not a method, so you should pass the argument to it in the parentheses instead of applying it with dot notation.
For future questions, please include the code directly or provide a link to a workspace snapshot. That will allow for a more thorough analysis in case the cause of the issue is not so obvious.

slurpee
6,694 Pointsdid what you said, well at least tried. still no fix D:

Steven Parker
225,769 PointsBetter, but you still have a few "toLowercase" (little "c") instead of "toLowerCase" (capital "C").

slurpee
6,694 PointsThank you guys so much with both of the feedback I fixed it and now it works!