Created
May 16, 2018 13:32
-
-
Save sylwiaeb/7f34b047a3c2f85e3038d387bcce7b4f to your computer and use it in GitHub Desktop.
Generate a random string with limit in JavaScript
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 characters
const generateString = (limit) => { | |
return new Date().getTime().toString().repeat(limit).substring(0, limit); | |
}; | |
generateString(10); // 1526477455 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment