- 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:
firstCatNamewith the name of the first player'Muffin'.firstCatPointswith value0.secondCatName, which contains the name of the second player'Rudolph'.secondCatPointswith value0.- Add parameters
firstPlayerName,firstPlayerPoints,secondPlayerName,secondPlayerPointsto functionrunGameafter parameterquantityand transfer the new variables to this function after argumentdiceNumber.
Comments