Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
curlyDev4697yWell it clearly says it sorts based on unicode...
Sort should be given a function...
But yeah. Remember boys and girls, always use documentation and never guess functionality. -
@arjaycodes the sort function should never be called like this. it needs a param function to define the type and the direction of the sort.
> [0, 1, 10, 2, 3, 8, 9].sort(function(a,b) { return a > b; });
[0, 1, 2, 3, 8, 9, 10]
:D sorry, I don’t know who’s author
joke/meme