0
How to write a++ in the new version of swift ??
I want to write a++ in my code but the new version doesn't let me do it how do I write a ++ in the new version
1 Answer
+ 1
Yes i found this also. In swift 3 they have removed the ++ and changed it to the below
a++ is now == a += 1
The + 1 and sum it to a
Therefore the below works out as:
var a = 1
a += 1
a += 1
print(a) // prints 3 (assuming you use this in an existing function etc.)