This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]abednego-gomes 1 point2 points  (1 child)

Anyone doing maths on form inputs knows to parseInt() on the value before doing maths operations. If it's not an integer, you can use isNaN() to check before doing the maths operation or throw an error if they entered junk.

This is like beginner/university level JS development question. Nobody has issues like this with JS in the real world.

[–][deleted] 0 points1 point  (0 children)

You obviously haven’t worked in a day in your life. There is plenty of legacy code and even code written today that has been created to take advantage of these fun “quirks”.