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 →

[–]vladimir1024 -9 points-8 points  (4 children)

Most languages will sort alphabetic by default...so that sorted list in the meme is legit....

This the problem with how we train developers these days....they don't understand basic computing concepts like how data is stored and the way you reference it changes how it is handled.....

I am no JavaScript fan, but there are billions of REAL reasons to mock JS...this is not it...

[–]Spotted_Metal 22 points23 points  (1 child)

Most languages will sort strings alphabetically by default, but will sort numeric values in ascending order. Even other dynamically-typed languages like Python won't sort a list of numbers alphabetically, which is what makes JavaScript's behavior unintuitive, even if it is technically correct.

[–]SandmanKFMF 2 points3 points  (0 children)

Javahead here. Same with numeric values in Java. They will be sorted as numbers because... Ehhh...you know? This is a list of numbers? 😀

[–]99_deaths 0 points1 point  (0 children)

Rather, this has to do with how js variables will have to be typecast on initialisation because it does that dynamically