Multiple choice

What is the difference between the = and == operators?

  1. The = operator is assignment, the == operator tests equality

  2. The == operator is assignment, the = operator tests equality

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

The single equals sign '=' is the assignment operator, which stores the value on its right into the variable on its left. The double equals sign '==' is a comparison operator used to evaluate whether two values are equal.