-
-
Save sillyslux/0d52ffac25f40611c47bfcdd9ae9acb7 to your computer and use it in GitHub Desktop.
This file contains 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 playersList = {}; | |
listeId.map((ident, i) => { | |
playersList[ident] = { | |
score : 0, | |
x : 0, | |
y : 0 | |
} | |
}) | |
const playersList = listeId.reduce( (p, c) => ({ ...p, [c]: { score: 0, x: 0 , y:0 } }), {}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment