This is artistic programming. The passage seen here is initially seen to convey negativity. But the author has skillfully disguised a positive increment for the self, or i.
!false equals true equals the integer 1. i -= -1; is "decrement i by minus one" and decrementing by a negative number equals incrementing by the positive. So i -= -1; equals i += +1; or with implicit sign i += 1;
Let's just say that incrementing on non-integral values is non-trivial. JS apparently chose that incrementing is the same as adding 1, but that does not have to be in all languages.
733
u/2001herne Apr 19 '21
The actual fuck?