Skip to content

Instantly share code, notes, and snippets.

@EliTheCoder
Created April 16, 2019 00:48
Show Gist options
  • Save EliTheCoder/03a9a5c5b7351ff55de6e0b606f0e9f9 to your computer and use it in GitHub Desktop.
Save EliTheCoder/03a9a5c5b7351ff55de6e0b606f0e9f9 to your computer and use it in GitHub Desktop.
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