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
-
Sykoah7119yI usually use a binary tree instead just so I have the ability to say I used a binary tree in case the juniors haven't learnt it yet. -
tytho22969y@btfoom JavaScript's sort method by default sorts them as strings, which means it will do it alphabetically instead of numerically. You have to pass the sort method a sorting function in order to get the results you want. It's not a very efficient sort, might I add -
btfoom6429y@tytho thanks! I know that. Just meant to say that is my reaction when something like this happens.
Related Rants

What only relying on JavaScript for HTML form input validation looks like
Found something true as 1 == 1
So I heard that you hate JavaScript...
Credit: Reddit
undefined
js