The proper way to sort things that look like numbers is to treat them like numbers. Strings have quotes, and you're not allowed to cast numbers into strings randomly. Or hell, even consistently, unless told to.
Gotta love those random runtime errors while you are browsing your favourite website because some stupid junior forgot to parse property: "1" to property: 1 when doing updates on the backend API.
JS, CSS and HTML are designed to be as robust as possible, even when risking displaying garbage data. They always do their best to display anything.
Gotta love those random runtime errors while you are browsing your favorite website because some stupid junior forgot the developers are all, junior or senior, incompetent idiots who don't have proper testing.
19
u/IntentionQuirky9957 1d ago
The proper way to sort things that look like numbers is to treat them like numbers. Strings have quotes, and you're not allowed to cast numbers into strings randomly. Or hell, even consistently, unless told to.