Created
February 11, 2020 14:27
-
-
Save AllGistsEqual/21c7d8827aa957550d5190a3ccd15c9c 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's add out dice in a game | |
const dicePool = [5, 2, 4] | |
const firstDiceThrow = [1, 4, 6] | |
const secondDiceThrow = [3, 6, 1] | |
console.log(dicePool) // [5, 2, 4] | |
dicePool.push(...firstDiceThrow, ...secondDiceThrow) | |
console.log(dicePool) // [5, 2, 4, 1, 4, 6, 3, 6, 1] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment