Created
December 3, 2015 09:05
-
-
Save crimx/5ac48e7cfa81cd054015 to your computer and use it in GitHub Desktop.
Revisions
-
crimx created this gist
Dec 3, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,13 @@ function count(s) { var r = s.split('') .sort() .join('') .match(/(\w)\1*/g) .sort(function(a,b) { return a.length < b.length }); return { letter: r[0], count: r.length } }