are these 2 expressions equivalent in kotlin? assu...
# announcements
v
are these 2 expressions equivalent in kotlin? assuming var start = 0
Copy code
start += 1  // expr1
start++    // expr2
s
They are slightly different.
start += 1
increases start by 1, but this whole line is a statement, not an expression
start++
also increases start by 1, but this whole line is an expression, returning the value of
start
before start is increased by one.
v
thanks
d
#C0B8MA7FA
🤣 1