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

Tell us what’s happening:

I don’t know what the issue is, I know I’m missing something, I just don’t know where. pls help out.

Your code so far

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

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

const playerScoreSpanElement = document.getElementById("player-score");
const computerScoreSpanElement = document.getElementById("computer-score");
const roundResultsMsg = document.getElementById("results-msg");

function showResults(userOption) {

roundResultsMsg.innerText = getRoundResults(userOption);
playerScoreSpanElement.innnerText = playerScore;
computerScoreSpanElement.innerText = computerScore;
};

showResults("Rock");

// User Editable Region
/* file: styles.css */

Your browser information:

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

Challenge Information:

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

Typo on 2nd line: innnerText

:man_facepalming: thanks a lot, seen the errors in my ways

1 Like

why do we need to add userOption in getAroundResults()?

thanks

Hi there!

userOption is the parameter for the function. Parameters are variables that you list as part of a function definition. They act as placeholders for values that will be passed to the function when it is called.