 3️⃣

# 2.3 Assignment Operators

This is basically syntax sugar. It just makes your code look nicer and cleaner. You can accomplish everything here with the basic arithmetic operators and equal signs.

### Assignment Operators

NameDescription
=
Assigns right operand value to the left operand.
+=
Sums up left and right operand values and assigns the result to the left operand.
-=
Subtract right operand value from left operand value and assign the result to the left operand.
*=
Multiply left and right operand values and assign the result to the left operand.
/=
Multiply left and right operand values and assign the result to the left operand.
%=
Get the modulus of the left operand divided by the right operand and assign the resulting modulus to the left operand.
``````let x = 5, y = 10, z = 15;

x = y;  // x would be 10

x += 1; // x would be 6

x -= 1; // x would be 4

x *= 5; // x would be 25

x /= 5; // x would be 1

x %= 2; // x would be 1``````

# Practice

You can add practice problems here if you want. Follow the format below.

# Previous Section

2️⃣
2.2 Arithmetic Operators

# Next Section

4️⃣
2.4 Points To Remember About Variables

⚖️