Review DOM Manipulation by Building a Rock, Paper, Scissors Game - Step 6

Tell us what’s happening:

Hi, I’ve read all the other forums and I still don’t understand what I’m doing wrong here. please help.

Your code so far

<!-- file: index.html -->

/* file: styles.css */

/* file: script.js */
// User Editable Region

function resetGame() {
  playerScore = 0;
  computerScore = 0;
  playerScoreSpanElement.innerText = playerScore;
  computerScoreSpanElement.innerText = computerScore; = "hidden"; = "block";
  roundResultsMsg = "";
  winnerMsgElement = "";

// User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ Safari/537.36 OPR/

Challenge Information:

Review DOM Manipulation by Building a Rock, Paper, Scissors Game - Step 6

Your issue is here

that is incorrect syntax

remember that you learned how to set the text content for an element in the role playing game.

take a look back at what you did here

function update(location) { = "none";
  button1.innerText = location["button text"][0];
  button2.innerText = location["button text"][1];
  button3.innerText = location["button text"][2];
  button1.onclick = location["button functions"][0];
  button2.onclick = location["button functions"][1];
  button3.onclick = location["button functions"][2];
  text.innerHTML = location.text;

you had to use a specific property here for the button1 variable

 button1.innerText = location["button text"][0];

If you need extra examples, then you can google "how to change text of an element in javascript"

there are tons of answers to show you correct syntax and what you are missing

hope that helps

Also, here is another hint

that might be clearer on what you need to do

Thank you so much it finally passed. It just kept telling me to set playerScore to 0 which I had already done so I got confused. thanks for your help :slight_smile:

1 Like