What is the meaning of == and how does it differ from =?
==
=
How do I know which one to use?
a == b is a test if a and b are equal.
a == b
a = b is called an assignment, which means to set the variable a to having the same value as b.
a = b
(You type | with Shift-\ in the US keyboard layout.)
|
\