- a, b are of same type:
a += b only needs 1 assignment, it’s like [pass by reference]
but for a = a + b, the process is as follows:
temp = a
a = temp + b
it’s take 2 assignment.
when a, b are strings, the problem is especially obvious.
- a, b are of different types
a += b can do implicit typecasting but a = a + b cannot