Guest User

Untitled

a guest
Oct 10th, 2012
129
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var sleepsort = function (arr) {
  2.     arr.forEach(function (item) {
  3.         setTimeout(function() {
  4.             console.log(item);
  5.         }, item * 100)
  6.     })
  7. }
  8.  
  9. sleepsort([4,1,3,2])
RAW Paste Data