We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 593afe1 commit 4f2ecd9Copy full SHA for 4f2ecd9
JS_Basic_Challenges/4-DOM-pig-game/starter/app.js
@@ -18,3 +18,8 @@ var currentScore = 0; // the score each player has per round/ session, whe
18
var activePlayer = 0; // the player that is currently rolling the dice
19
20
dice = Math.floor(Math.random() * 6) + 1; // create a dice that generates a random number from 1 to 6 (included)
21
+
22
+// document.querySelector('#current-' + activePlayer).textContent = Math.floor(Math.random() * 6) + 1;
23
+document.querySelector('#current-' + activePlayer).textContent = dice;
24
+// The textContent property sets or returns the text content of the node you specify. In our case, that's the dice value of the player rolling it.
25
0 commit comments