2.3 Assignment Operators
3️⃣

2.3 Assignment Operators

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.
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.
 
⚖️
Copyright © 2021 Code 4 Tomorrow. All rights reserved. The code in this course is licensed under the MIT License. If you would like to use content from any of our courses, you must obtain our explicit written permission and provide credit. Please contact classes@code4tomorrow.org for inquiries.