First I assume that the missing bracket to close off the else is a copy and paste typo.
A single equals sign “=” is an Assignment Operator to set a value.
( set value on the left side of the = to the value on the right side of the = sign )
A double equals sign “==” is a Comparison Operator of is equal to
( check if the value from the left side of the == signs is equal to the right side of the == signs,
return true/false )