Wavened
Wavened

Reputation: 88

Is there an Add Assignment (+=) or similar in Lua?

I would like to know if there is a add assignment (+=) or a similar assignment in lua since I'm used to using it from other languages like Python and C#

Upvotes: 0

Views: 261

Answers (1)

Spar
Spar

Reputation: 1762

No, you have to use x = x + 1.

There is a Lua transpiler called Moonscript that has this feature.

Upvotes: 2

Related Questions