- 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 the following 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 the functionrunGameafter the parameterquantityand pass the new variables’ values in the function call after the argumentdiceNumber.
Comments