- script.js
JavaScript
var diceNumber = 2;
var runGame = function (quantity) {
console.log(muffin.throwDice(quantity, quantity * 6));
};
runGame(diceNumber);
Result
Goalscompleted
After diceNumber
and before the runGame
function, declare a variables:
firstCatName
with the name of the first player'Muffin'
.firstCatPoints
with value0
.secondCatName
, which contains the name of the second player'Rudolph'
.secondCatPoints
with value0
.- Add parameters
firstPlayerName
,firstPlayerPoints
,secondPlayerName
,secondPlayerPoints
to functionrunGame
after parameterquantity
and transfer the new variables to this function after argumentdiceNumber
.
Comments