Last active
January 6, 2018 18:23
-
-
Save ktilcu/6cdb3b9ccd185675496d33e99e83743e 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
| const getAvatars = async (userId) => { | |
| const user = await getUser(userId); | |
| const avatar = await user.avatar(); | |
| const friends = await user.friends(); | |
| const avatars = [avatar]; | |
| for (let friend of friends) { | |
| avatars.push(await friend.avatar()); | |
| } | |
| return avatars; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment