Welcome to the Treehouse Community
Looking to learn something new?
Sandesh sardarCourses Plus Student 3,042 Points
Not getting answer
Declare a constant named isWinner and assign the results of a comparison operation to check whether the player has won or not. For example, if the total score is not 10, then the player has won and isWinner should equal true. (Hint: Use the NOT operator)
let totalScore = 9 let isWinner = totalScore != 10 //---- true
what I am doing wrong?
// Enter your code below var initialScore = 8 initialScore += 1 let totalScore = 9 let isWinner = toatalScore != 10
Jorge Solana6,064 Points
You don't need any constant "totalScore" for this challenge, we already have that initialScore. Rest is fine.
Hope it helps!