Ask coding questions

← Back to all posts
If Else
DonoldJTrump

I have an

For some reason, my variable will not change when the conditions are met. I have it outputing the results to the console (debugging), but it dose not seem to be working. Any ideas?

@Coder100
Answered by Coder100 [earned 5 cycles]
View Answer
Voters
DonoldJTrump
Comments
hotnewtop
Coder100

well

did you see this bogus statement

cookies can't ever be 0 and 1 at the same time, did you mean Cookies == 1?

DonoldJTrump

@Coder100 THAT makes scene. I used and instead of or. I am an idiot.

DonoldJTrump

@Coder100 also sorry for the ping

Coder100

lol np

btw wouldn't you say 0 cookies and not 0 cookie @DonoldJTrump

DonoldJTrump

@Coder100 technically you would never see Your cookies are 0, soooooooooooo...

Coder100

i have 0 cookies @DonoldJTrump