Created
April 16, 2019 00:48
-
-
Save EliTheCoder/03a9a5c5b7351ff55de6e0b606f0e9f9 to your computer and use it in GitHub Desktop.
This file contains 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 characters
function recurring(input: string) { | |
let save: string[] = []; | |
for (let i of input) { | |
if (save.includes(i)) { | |
return i; | |
} else { | |
save.push(i); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment