Skip to content

Instantly share code, notes, and snippets.

@JoeChapman
Created March 21, 2012 13:56
Show Gist options
  • Select an option

  • Save JoeChapman/2147075 to your computer and use it in GitHub Desktop.

Select an option

Save JoeChapman/2147075 to your computer and use it in GitHub Desktop.
Basic example of sorting numeric values in ascending order
var arr = [5, 40, 300];
arr.sort();
// Result
300, 40, 5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment