Created
June 13, 2020 22:58
-
-
Save cnunciato/4a9cde2492b63d9f763d565b5c7b785b to your computer and use it in GitHub Desktop.
Who does what?
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
| var kids = ["Oliver", "Sam", "Rosemary"]; | |
| var rooms = ["Living room", "Dining room", "Library"]; | |
| rooms.sort(() => Math.random() > 0.5 ? 1 : -1).map((o, i) => ({ [kids[i]]: o })); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment