Skip to content

Instantly share code, notes, and snippets.

@teramako
Created December 16, 2009 03:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save teramako/257561 to your computer and use it in GitHub Desktop.
Save teramako/257561 to your computer and use it in GitHub Desktop.
カード配り(10分プログラミング)
//テーマはvar, letを使わないこと
(function(n,c)
c.substr(0,c.length-c.length%n).split("").reduce(
function(p,c,i){
p[i%n]+=c;
return p;
},
Array.apply("",Array(n)).map(function()"")
).toSource()
)(4,"111122233445a")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment