Skip to content

Instantly share code, notes, and snippets.

@bobdobbalina
Last active June 3, 2020 14:34
Show Gist options
  • Select an option

  • Save bobdobbalina/ba42e02661628b73454e7040cb4d9eed to your computer and use it in GitHub Desktop.

Select an option

Save bobdobbalina/ba42e02661628b73454e7040cb4d9eed to your computer and use it in GitHub Desktop.
Javascript: Sort number arrays
[0, 10, 4, 9, 123, 54, 1].sort((a, b) => a - b);
>>> [0, 1, 4, 9, 10, 54, 123]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment