The ++ operator works in for loops. But for assigning and incrementing variables outside of loops, ++ is silently ignored.