Skip to content

Instantly share code, notes, and snippets.

@chenglou
Created July 7, 2013 23:36
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chenglou/5945385 to your computer and use it in GitHub Desktop.
Save chenglou/5945385 to your computer and use it in GitHub Desktop.
Based on the idea of a random person on the web, comes the best sort the world has, and will, ever know.
function timeSort(array) {
array.forEach(function(item) {
setTimeout(function() {
console.log(item);
}, item);
});
}
timeSort([10,4,6,2,3,5]);
@eucalyp
Copy link

eucalyp commented Jul 11, 2013

a big step for computer science. thanks a lot :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment