Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

JavaScript

slurpee
slurpee
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
216,033 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.

slurpee
slurpee
6,694 Points

https://w.trhou.se/n9wp9viuhc

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

Steven Parker
Steven Parker
216,033 Points

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

slurpee
slurpee
6,694 Points

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