0
Can you help me to understand why the if doesnt work there. I am noob 😂 thank you
5 Respostas
+ 1
Don't worry, you are here to learn.
Just sometimes revise the theory
Or look some similar code to check and correct yourself instantly ;)
+ 3
== instead of =
use = for assignment, like:
x = 5
assigns the value 5 to x variable
use == for comparison, like:
if(x==5) { Do Stuff; }
+ 1
Thank you very much. I understand now
+ 1
The = operator is for assigning values to variables, the == operator is for comparing objects. Change the = on line 16 as Wally says to ==
0
And when i wrote "red" on the input box the first letter is uppercase i doesnt expected this. sorry for my english and thx for the answer