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
Unsubscribed User903 Points
Please help me answer this, I can't solve.
Steve Hunter57,709 Points
The first part wants you to assign an incremeneted value of
totalScore so they both have the same value. To do this, use the increment operator,
++. If you put that in front of the variable you want to increment (add one to), it'll do the increment first, then do the assignment. So:
let totalScore = ++initialScore
This adds one to
initialScore then assigns that new value into
Next, you want to see if
totalScore is not equal to 10; evauate that to
false and assign that value into a constant called
isWinner. So, you want to see if
totalScore is not equals - that's this operator:
totalScore to 10 using that, and assign the result into
let isWinner = totalScore != 10
I hope that helps.