Skip to content

Instantly share code, notes, and snippets.

@karolk
Last active January 4, 2016 10:19
Show Gist options
  • Save karolk/8608055 to your computer and use it in GitHub Desktop.
Save karolk/8608055 to your computer and use it in GitHub Desktop.
(new Array(10000)+'')
.split(',')
.map(function(){
return ~~(Math.random()*100)
})
.sort()
.reduce(function(arr, val){
arr[val]||(arr[val]=[]);
arr[val].push(val);
return arr
},[])
.map(function(arr, index){
return index+": "+arr.map(function() {
return '='
})
.join("")
})
.join("\n")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment