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
I think I may be a little confused by the phrasing of this challenge.
I think I may be a little confused by the phrasing of this question. The winner is anyone who did not receive a 10. so let isWinner = !10, no?
// Enter your code below var initialScore = 8 initialScore += 1 let isWinner = intialScore !10
Jason AndersTreehouse Moderator 145,855 Points
Your thinking is on the right track, but the code just needs a little rearranging.
First off, you do have a typo in the last line of code. You are missing an "i" in
not operator can't actually be used up against the integer like that, but you are correct in that you need to check that
initialScore does not equal 10. So, instead of using it on the integer, you will use it with the equal sign to negate the equality, which means you will need to use
!=. Hint: the last line of code will actually have 2 equal signs. One to assign the value and one with the negator to check the value. (Hope that helps)
Other than that, it's looking good. :)
Thank you for the help!