
Originally Posted by
Vacci
A single equal sign "=" can be thought of as assigning a value to a variable (i.e. varX = 5 means "varX is now equal to 5").
On the other hand, a double equals sign "==" is a check, like asking the program a question (i.e. varX == 5 means "is varX equal to 5?"). From there, the program behaves accordingly to whether that question is answered true or false.