Clarification needed | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Clarification needed

The lesson for assignment operators was very short. what is the exact purpose of the assignment operators and how do they fit into programming.

26th Jan 2019, 7:41 PM
Michael
2 Answers
+ 6
Short & concise code is friendly to the eyes, and is a blessing especially to programmers that work for huge companies/contractors (due to dealing with several hundreds of thousands of lines of code, etc).
26th Jan 2019, 9:52 PM
Fox
Fox - avatar
+ 2
Assignment operators are simply to shorten your code and make it faster to write. I use them all the time. a += 5 means a = a + 5 a -= 5 means a = a - 5 a *= 5 means a = a * 5 a /= 5 means a = a / 5 a %= 5 means a = a % 5
26th Jan 2019, 8:16 PM
James
James - avatar