Welcome to the Treehouse Community
Looking to learn something new?
Derek Hutson9,740 Points
Is toUpperCase being used correctly?
I made it through conditional statements, but I consistently had a hard time getting the program to recognize toUpperCase function even though it seems like I typed it out correctly.. Is that the error I made here? Or is it something else? Or both? Thanks!
Steven Parker215,987 Points
The use of the "toUpperCase" method seems correct in this code, but I see a few other issues:
- there's a missing closing brace on or near line 24
- another closing brace is missing before line 35
- on line 14, "parseInt" is being used as if it were a string method
- it might be more consistent to compare the number as a string like the other questions
- if you do convert the input to a number, it should be compared to just 2 instead of "2"