sdras / array-explorer

⚡️ A resource to help figure out what JavaScript array method would be best to use at any given time

Home Page:https://arrayexplorer.netlify.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Write up sort() caveat

sdras opened this issue · comments

Sort should have a warning like the MDN docs

Like how it sorts in place, the sort is unstable, and it uses unicode value so numeric sorting requires it's own comparator? Would it be helpful to allow them to select the kind of sort they want to do, then provide the standard numeric comparator if they want to sort numeric values.

I'd like to make this change, just let me know the scope.

Hi @stephenlcurtis, thanks for your willingness to collaborate on this.This isn't documentation, though. This is a way to explore that guides you to documentation, so I won't be clarifying as thoroughly as that, I'm going to mention that there are some caveats, such as the one mentioned when I opened the issue, and point to the documentation. Thanks though.

This is done!