Skip to content

Instantly share code, notes, and snippets.

@IvanAdmaers
Created October 23, 2021 10:26
Show Gist options
  • Save IvanAdmaers/73b79fe8b44fdc83e21d4162f480ad38 to your computer and use it in GitHub Desktop.
Save IvanAdmaers/73b79fe8b44fdc83e21d4162f480ad38 to your computer and use it in GitHub Desktop.
Create a Fake Array JS
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