cue a billion nodejs shitters telling you you're just not using enough frameworks.
-
-
-
you just have to apply left-pad to all the array elements beforehand, obviously.
- Show replies
New conversation -
-
-
«everythingIsAString» oriented language xD
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
This Tweet is unavailable.
-
If you pass a function with signature (a,b)=>{}, you can alter the behavior of sort (eg sort by a property that's on every object in your array)
- Show replies
-
-
-
Imagine a world where VBScript won instead.
-
JS IS GREAT! JS IS GREAT! xDDDD
End of conversation
New conversation -
-
-
It pisses me off to no end how common this is.
@CircuitMaker does it when you're making parts and dealing with pins, but also ls does itpic.twitter.com/9XnJ0KAAda
-
Filenames are strings. That's natural. This is why you pad numerical filenames with zeros (or pipe to sort -n). Javascript knows full well the elements are integers but chooses to treat them as strings.
- Show replies
New conversation -
-
-
Python has no problem sorting an untyped array numerically if it contains numbers. Coercing to string by default is completely ridiculous.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.