Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
deadlyRants551210y@balambuc I know. But if someone actually uses that code they probably also copy-paste it for other types. -
I bet there is a js lib somewhere doing the equivelant and its just being blindly used 😨
-
jpichardo729910yAwfully as it seems I recently found a similar code of one of my friends, a for-like while. I almost went to jail for premeditated murder. -
jpichardo729910y@ralee That's the idea at some point `i` will be at the maximum value of an integer and cause an exception which would end the loop. -
MarounMaroun63910y@jpichardo Actually there is no exception thrown here, but integer overflow, which will get negative number. -
jpichardo729910y@MarounMaroun I remember trying to assign (Java) a exaggeratedly great value to a int and getting a numberformatexception
Related Rants

Coworker's whiteboard today
How to get max value of an integer
undefined
integer
java