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 trial

JavaScript

angelod
angelod
6,694 Points

correct = 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
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Hi 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! :sparkles:

Steven Parker
Steven Parker
229,982 Points

When 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.

angelod
angelod
6,694 Points

https://w.trhou.se/n9wp9viuhc

did what you said, well at least tried. still no fix D:

Steven Parker
Steven Parker
229,982 Points

Better, but you still have a few "toLowercase" (little "c") instead of "toLowerCase" (capital "C").

angelod
angelod
6,694 Points

Thank you guys so much with both of the feedback I fixed it and now it works!