if (n = 2)
n = 2
if (n == 2)
1234
n = 2 // assign value '2' to variable 'n'. Always true n == 2 // true, if variable 'n' already has value 2 2 == n // true, if variable 'n' already has value 2 2 = n // error