Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (function rhyme(m,e) {
- return (function(m,e) {
- 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] } };
- for (i = 0; i<e.length; ++i) if (typeof e[i] !== 'undefined') return e[i];
- throw "not found"
- })(m-1,e);
- })(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