- Feature Articles
- CodeSOD
- Error'd
-
Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Edit Admin
The same way it happens anywhere: one misstep at a time.
Admin
Performance is obviously not a thing, because they're calling
value_.split( ',' )three times, and usingvalue_.split( ',' )[1] twice. They're also potentially callingparseInt( value_.split( ',' )[ 1 ], 10 )twice. (They also could have used the result ofvalue_.indexOf( ',' )` instead of splitting...)And
parsedCommaValueis a number if it's < 9, otherwise it's a string.Admin
Performance is obviously not a thing given that they are using javascript.
Edit Admin
Sorry, that was as far as I got before I bailed.
Addendum 2026-02-03 09:07:
Edit Admin
In addition to all the other sins,
handleInputis a really vague name for a number-parsing function.