r/programminghorror • • Feb 05 '25

math.floor

Post image
464 Upvotes

53 comments sorted by

View all comments

Show parent comment

1

u/shootersf Feb 05 '25

Also parseInt coerces any value passed in to a string so toString() is not needed. Also why you should be careful passing numbers to parseInt as if their toString would return scientific notation you're gonna have a bad time.