# Build a Rock, Paper, Scissors Game - Step 6

**URL:** <https://forum.freecodecamp.org/t/build-a-rock-paper-scissors-game-step-6/799840>\
**Category:** Curriculum Help\
**Tags:** javascript\
**Created:** [September 9, 2026, 3:20pm UTC](https://forum.freecodecamp.org/t/build-a-rock-paper-scissors-game-step-6/799840 "2026-09-09T15:20:44Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ruhollahbayani](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ruhollahbayani/32/421126_2.png) [@Ruhollahbayani](https://forum.freecodecamp.org/u/Ruhollahbayani)\
**Post date:** [September 9, 2026, 3:20pm UTC](https://forum.freecodecamp.org/t/build-a-rock-paper-scissors-game-step-6/799840/1 "2026-09-09T15:20:44Z")

</div>

### Tell us what’s happening:

1. Your getRoundResults function should return the correct message based on who wins the round. If no one wins, the message should say it’s a tie.  
I don’t see anything wrong with the Message

### Your code so far

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

```

```css
/* file: styles.css */

```

```js
/* file: script.js */
// User Editable Region
if (hasPlayerWonTheRound(userOption, computerChoice)) {
    // Player wins
    playerScore += 1; // update the score
    return `Player wins! ${userOption} beats ${computerChoice}`;
  } else if (userOption === computerChoice) {
// User Editable Region

```

### Your browser information:

User Agent is: `Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/151.0.0.0 Safari/537.36`

### Challenge Information:

Build a Rock, Paper, Scissors Game - Step 6

> **[freeCodeCamp.org](https://www.freecodecamp.org/learn/javascript-v9/workshop-rps-game/step-6)**
>
> Learn to Code — For Free

GitHub Link: [freeCodeCamp/curriculum/challenges/english/blocks/workshop-rps-game/66cf33305293e1b35c1aef7f.md at main · freeCodeCamp/freeCodeCamp · GitHub](https://github.com/freeCodeCamp/freeCodeCamp/blob/main/curriculum/challenges/english/blocks/workshop-rps-game/66cf33305293e1b35c1aef7f.md)

---

<div class="post-metadata">

**Author:** ![Ruhollahbayani](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ruhollahbayani/32/421126_2.png) [@Ruhollahbayani](https://forum.freecodecamp.org/u/Ruhollahbayani)\
**Post date:** [September 9, 2026, 3:21pm UTC](https://forum.freecodecamp.org/t/build-a-rock-paper-scissors-game-step-6/799840/2 "2026-09-09T15:21:44Z")

</div>

### Tell us what’s happening:

1. Your getRoundResults function should return the correct message based on who wins the round. If no one wins, the message should say it’s a tie.  
what did I do wrong here?

### Your code so far

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

```

```css
/* file: styles.css */

```

```js
/* file: script.js */
// User Editable Region
if (hasPlayerWonTheRound(userOption, computerChoice)) {
    // Player wins
    playerScore += 1; // update the score
    return `Player wins! ${userOption} beats ${computerChoice}`;
  } else if (userOption === computerChoice) {
// User Editable Region

```

### Your browser information:

User Agent is: `Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/151.0.0.0 Safari/537.36`

### Challenge Information:

Build a Rock, Paper, Scissors Game - Step 6

> **[freeCodeCamp.org](https://www.freecodecamp.org/learn/javascript-v9/workshop-rps-game/step-6)**
>
> Learn to Code — For Free

GitHub Link: [freeCodeCamp/curriculum/challenges/english/blocks/workshop-rps-game/66cf33305293e1b35c1aef7f.md at main · freeCodeCamp/freeCodeCamp · GitHub](https://github.com/freeCodeCamp/freeCodeCamp/blob/main/curriculum/challenges/english/blocks/workshop-rps-game/66cf33305293e1b35c1aef7f.md)

---

<div class="post-metadata">

**Author:** ![dhess](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/dhess/32/406235_2.png) [@dhess](https://forum.freecodecamp.org/u/dhess)\
**Post date:** [September 9, 2026, 3:27pm UTC](https://forum.freecodecamp.org/t/build-a-rock-paper-scissors-game-step-6/799840/3 "2026-09-09T15:27:52Z")

</div>

Hi @Ruhollahbayani,

I went ahead and combined your posts for you. In the future, just reply to the original thread to add further updates.

Thank you.

---

<div class="post-metadata">

**Author:** ![dhess](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/dhess/32/406235_2.png) [@dhess](https://forum.freecodecamp.org/u/dhess)\
**Post date:** [September 9, 2026, 3:43pm UTC](https://forum.freecodecamp.org/t/build-a-rock-paper-scissors-game-step-6/799840/4 "2026-09-09T15:43:29Z")

</div>

```auto
function getRoundResults(userOption) {
  const computerResult = getRandomComputerResult();
  
  
}

```

You have changed this starting code. Please reset this step and try again.

Happy coding

---

<div class="post-metadata">

**Author:** ![Ruhollahbayani](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ruhollahbayani/32/421126_2.png) [@Ruhollahbayani](https://forum.freecodecamp.org/u/Ruhollahbayani)\
**Post date:** [September 9, 2026, 4:05pm UTC](https://forum.freecodecamp.org/t/build-a-rock-paper-scissors-game-step-6/799840/5 "2026-09-09T16:05:22Z")

</div>

> [@dhess](#):
>
> `const computerResult = getRandomComputerResult();`

Thank you for your help

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/freecodecamp/original/3X/e/1/e1c433102e34b46dfaa3e15d13ab9a514b127078.svg) [@system](https://forum.freecodecamp.org/u/system)\
**Post date:** [September 12, 2026, 4:04am UTC](https://forum.freecodecamp.org/t/build-a-rock-paper-scissors-game-step-6/799840/7 "2026-09-12T04:04:49Z")

</div>

Closed on September 12, 2026, 4:04am UTC

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.
