Last active
May 30, 2018 16:48
-
-
Save AyoAlfonso/34c18311af3fb4864eb4afb23e282364 to your computer and use it in GitHub Desktop.
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
| 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