Skip to content

Instantly share code, notes, and snippets.

@AyoAlfonso
Last active May 30, 2018 16:48
Show Gist options
  • Select an option

  • Save AyoAlfonso/34c18311af3fb4864eb4afb23e282364 to your computer and use it in GitHub Desktop.

Select an option

Save AyoAlfonso/34c18311af3fb4864eb4afb23e282364 to your computer and use it in GitHub Desktop.
let user = [Jane, Bane, Deadpool, Thanos]
let state = 0;
let uninvitedUsers = users.filter(user => {
if (user.invite == "notInvited") {
let rangeArray = range(from, to)
for (let i = 0; i < rangeArray.length; i++) {
if (user.rank == rangeArray[i]) {
state += 1
return user, state
}
}
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment