- script.js
JavaScript
var gameRules = {
diceNumber: 2,
Result
GoalsCompleted 0 out of 5
- Write an array of one element
max
to thewinners
variable in the check for a new record holder aftermax = currentPlayer
. - Delete log of a message about a record holder in the console.
- Add the
else
branch to the condition. - Inside
else
, write nestedif
, which checks equality of points of the current player and those of the record holder (use strict comparison===
). - If this condition is met, add the current player to the winners array using the
push
method.
Comments