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 trialAlexisca hall
23,683 PointsIn this game of ours, we have an odd scoring mechanism . At the end of the round, if your score is 10, you lose! If it's
how to solve this
// Enter your code below
var initialScore = 8
initialScore += 1
let isWinner = score != 10
1 Answer
Steve Hunter
57,712 PointsHi Alexisca,
You changed the variable name from initialScore
to score
. You want to test if initialScore
is !=
to 10
and assign the result of that comparison into the constant isWinner
.
You're totally correct except for the change of variable name. I hope that helps. Shout if not.
Steve.