Skip to content

Instantly share code, notes, and snippets.

@cursorial
Last active April 17, 2021 20:44
Show Gist options
  • Save cursorial/58b9f320a6de703dcc13f07082272272 to your computer and use it in GitHub Desktop.
Save cursorial/58b9f320a6de703dcc13f07082272272 to your computer and use it in GitHub Desktop.
Follow users at random intervals
const random = (min, max) => {
return Math.random() * (max - min) + min;
}
const data = [/* user id array */]
data.map((item, index) => {
setTimeout(() => followUser(item), random(60000, 120000) * index)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment