Created
October 23, 2021 10:26
-
-
Save IvanAdmaers/73b79fe8b44fdc83e21d4162f480ad38 to your computer and use it in GitHub Desktop.
Create a Fake Array JS
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 getRandomId = () => `_${Math.random().toString(36).substring(2, 9)}`; | |
const createFakeArray = (length = 10) => | |
new Array(length).fill('_').map(() => getRandomId()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment