apple
1
Tell us what’s happening:
I do not know what I did wrong but it keeps on giving me errors
Your code so far
<!-- file: index.html -->
/* file: styles.css */
/* 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) {
playerScoreSpanElement.innerText = playerScore
computerScoreSpanElement.innerText = computerScore
roundResultsMsg.innerText = getRoundResults(userOption)
};
showResults("Rock");
// 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/137.0.0.0 Safari/537.36
Challenge Information:
Review DOM Manipulation by Building a Rock, Paper, Scissors Game - Step 4
Welcome to the forum 
What error? Often the error will contain a clue to the solution.
apple
3
It keeps on say " Your showResults
function should update the roundResultsMsg
with the result of the round." but I have no clue what that means
That’s not true because you’ve implemented it perfectly.
There is a problem though. You are updating the displayed score and then calling the getroundresults function.
What is in the getRoundResults(userOption)
function? What does it do?
apple
5
well it takes a parameter (userOption) then returns depending on the result of the game, it returns with string ouput
Does it update any global variables?
apple
7
Yes it does, But shouldnt it as the return value?
ILM
8
consider what global variables it is updating, are they involved in the function tou are writing now?
I’m sorry I don’t understand your question, can you rephrase it?
Which global variables does it update?