Tell us what’s happening:
Unable to show round results . i guess rest of my code is correct and missing something
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/134.0.0.0 Safari/537.36 Edg/134.0.0.0
Challenge Information:
Review DOM Manipulation by Building a Rock, Paper, Scissors Game - Step 4
ILM
March 12, 2025, 5:34pm
2
you may be doing things in the wrong order. Which of these three lines update playerScore
and computerScore
?
1 Like
Thanks understood the result was on wrong line …
wmo
April 3, 2025, 3:10pm
4
function showResults(userOption) {
const roundResult = getRoundResults(userOption);
playerScoreSpanElement.innerText = playerScore;
computerScoreSpanElement.innerText = computerScore;
roundResultsMsg.innerText= getRoundResults(userOption);
};
ILM
April 3, 2025, 4:43pm
5
hi @wmo , do you have a question or something?
why did the playerScoreSpanElement use computerScore and computerScoreSpanElement use playerScore? im confuse as to why is that
This thread has already been resolved
It is great that you solved the challenge, but instead of posting your full working solution, it is best to stay focused on answering the original poster’s question(s) and help guide them with hints and suggestions to solve their own issues with the challenge. How to Help Someone with Their Code Using the Socratic Method
We are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting full working solutions.