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 trialJonathan Hayes
Full Stack JavaScript Techdegree Student 3,008 PointsWhy is it always saying "Sorry, that's incorrect" no matter what way i'm typing mercury?
Heres my screenshot ! https://w.trhou.se/f6w9zet0o6 I would really appreciate the help!
1 Answer
Rohald van Merode
Treehouse StaffHi Jonathan Hayes 👋
Looks like you're not calling the toUpperCase
method and currently are only referencing the function to compare it to the string. You'll want to make sure to call the method by adding parentheses at the end ()
.
if(answer.toUpperCase() === 'MERCURY'){}
Hope this helps! 😃
Jonathan Hayes
Full Stack JavaScript Techdegree Student 3,008 PointsJonathan Hayes
Full Stack JavaScript Techdegree Student 3,008 PointsDuuuuhhhhh that would make sense lol.. Thank you so much!