
Christopher J Doyle
682 Pointshaving a little issue on the not operator.
initialScore = 8 initialScore += 1
let isWinner = !10
I know I'm making a mistake on the not operator. I have tried 3 different combinations. Anybody available to help, please?
// Enter your code below
var initialScore = 8
initialScore += 1
let isWinner = !10
2 Answers

Steven Parker
177,711 PointsIt's not the number 10 you want to use the "not" on, it's the comparison operator. And you need to involve the score in the comparison and then assign the result to the new constant. So it might look like this:
let isWinner = initialScore != 10
Happy coding! And for some holiday-season fun and extra practice, give Advent of Code a try!

Christopher J Doyle
682 PointsI tried that code earlier before I asked for help... let me try it again..Thank you Steven

Steven Parker
177,711 PointsChristopher J Doyle @mdash; if it doesn't solve the issue, post again. And if it does, you can mark the question solved by choosing a "best answer".
Happy coding!