Learn Ruby
If Else
7.10
Lesson

Difference between = and ==

A single = is used to assign value to a variable.

name = "John Smith"

A double == is an equality operator. It checks if the value on the left hand side is same as the value on the right hand side or not. It is used in if else conditions.