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 trialJustus Aberson
1,035 PointsWhat am I doing wrong?
Hey guys, I'm currently working with operators and I dont know why my code is not correct. Can anyone help me out? Thanks!
// Enter your code below
var initialScore = 8
initialScore = initialScore + 1
let totalScore = ++initialScore
let isWinner = totalScore != 10
Jared de Guzman
4,811 PointsinitialScore = initialScore + 1
Remove this line. You only need to increment initialScore once according to the problem.
Jari Koopman
Python Web Development Techdegree Graduate 29,349 PointsJared de Guzman Hey, just a quick tip, next time if you submit an answer, put it in the answers box and not in the comments box. That way the person who asked the question will get a notification he has an answer instead of a notification he has a comment!
2 Answers
Jari Koopman
Python Web Development Techdegree Graduate 29,349 PointsHey Justus,
The only thing wrong with your code is this line:
initialScore = initialScore + 1
This is the initial score so you shouldn't modify it. If you delete that line your code should work.
Hope this helped!
Regards, Jari
durul
62,690 Pointslet isWinner = initialScore <= 10 ? true : false
Aurelian Spodarec
10,801 PointsAurelian Spodarec
10,801 PointsWhat is the bummer saying to you?