SwVitaliy

Untitled

Jul 30th, 2012
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (function rhyme(m,e) {
  2.  
  3. return (function(m,e) {
  4. var i, j, k = e.length; for (i = j = 0; k > 1; i = i === e.length ? 0 : i+1) { if (typeof e[i] === 'undefined') continue; if (j<m) { ++j; } else { --k; j = 0; delete e[i] } };
  5. for (i = 0; i<e.length; ++i) if (typeof e[i] !== 'undefined') return e[i];
  6. throw "not found"
  7. })(m-1,e);
  8.  
  9. })(2, (function() { var c, s = 'a'.charCodeAt(0), len = 'z'.charCodeAt(0)-s + 1, r=[]; for (c=0; c<len; ++c) r.push(String.fromCharCode(s+c)); return r; })())
Advertisement
Add Comment
Please, Sign In to add comment