Clarification needed | Sololearn: Learn to code for FREE!

+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.

1/26/2019 7:41:47 PM

Michael

2 Answers

New Answer

+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).

+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