Unless functions explicitly return a truthy value, they return undefined. Which is falsey!
Arrays convert all values to strings before sorting.
But you can tell it to sort smartly:
And those reserved words are:
abstract boolean break byte case catch char class const continue debugger default delete do double else enum export extends false final finally float for function goto hotdog (jk) if implements import in instanceof int interface long native new null package private protected public return short static super switch synchronized this throw throws transient true try typeof var void volatile while with
parseInt() needs TWO params or it will f&#@ you over.
And that's it! Keep in mind that I am really only mentioning the Bad Parts because they're more likely to cause hard-to-find bugs in your code. The Good Parts are of course worth checking out too.