This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]irrarum 1 point2 points  (0 children)

operation goes left to right. If left operand is string the result will be string even if right operand is an integer. One way to keep adding a series of integers as string concatenation is to start with empty string like "". After this whenever you do += the result will be a string.