Hacker News new | ask | show | jobs
by seasoup 2430 days ago
I think that while people wouldnt be surprised that

i -= -1

works, formatted as

i-=-1

it's unclear what each - is doing, likely someone did it because it looks nice and symmetrical, as opposed to

i+=1

1 comments

Probably because in js if i="1" then i+=1 results in i="11" but i-=-1 results in i=2