Last active
February 24, 2021 23:23
-
-
Save theneosloth/3be789dcfec29866f18e1fccfa0885c5 to your computer and use it in GitHub Desktop.
Dot Cycler
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
const dotCycler = (maxDots) => { | |
let dotCount = -1; | |
return () => { | |
dotCount = (dotCount + 1) % (maxDots + 1); | |
return '.'.repeat(dotCount); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment