# Learn Basic JavaScript by Building a Role Playing Game - Step 141

**URL:** <https://forum.freecodecamp.org/t/learn-basic-javascript-by-building-a-role-playing-game-step-141/692072>\
**Category:** Curriculum Help\
**Tags:** javascript\
**Created:** [May 26, 2024, 6:32am UTC](https://forum.freecodecamp.org/t/learn-basic-javascript-by-building-a-role-playing-game-step-141/692072 "2024-05-26T06:32:47Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![muhammadfahada2](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/muhammadfahada2/32/363168_2.png) [@muhammadfahada2](https://forum.freecodecamp.org/u/muhammadfahada2)\
**Post date:** [May 26, 2024, 6:32am UTC](https://forum.freecodecamp.org/t/learn-basic-javascript-by-building-a-role-playing-game-step-141/692072/1 "2024-05-26T06:32:47Z")

</div>

### Tell us what’s happening:

it says You should use dot notation to access the innerHTML property of text.

### Your code so far

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

```

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

```

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

  monsterStats.style.display = "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.innerText = location.text;
  document.querySelector("text").innerHTML = text.innerText;

// 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/123.0.0.0 Safari/537.36 OPR/109.0.0.0`

### Challenge Information:

Learn Basic JavaScript by Building a Role Playing Game - Step 141

> **[freeCodeCamp.org](https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures-v8/learn-basic-javascript-by-building-a-role-playing-game/step-141)**
>
> Learn to Code — For Free

---

<div class="post-metadata">

**Author:** ![Naomi](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/naomi/32/422181_2.png) [@Naomi](https://forum.freecodecamp.org/u/Naomi)\
**Post date:** [May 26, 2024, 6:33am UTC](https://forum.freecodecamp.org/t/learn-basic-javascript-by-building-a-role-playing-game-step-141/692072/2 "2024-05-26T06:33:32Z")

</div>

```auto
  text.innerText = location.text;
  document.querySelector("text").innerHTML = text.innerText;

```

`text` already has the element you’re selecting. It looks like you’ve got an extra step in here you don’t need.

---

<div class="post-metadata">

**Author:** ![muhammadfahada2](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/muhammadfahada2/32/363168_2.png) [@muhammadfahada2](https://forum.freecodecamp.org/u/muhammadfahada2)\
**Post date:** [May 26, 2024, 6:37am UTC](https://forum.freecodecamp.org/t/learn-basic-javascript-by-building-a-role-playing-game-step-141/692072/3 "2024-05-26T06:37:33Z")

</div>

So whats the correct code for this

---

<div class="post-metadata">

**Author:** ![Naomi](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/naomi/32/422181_2.png) [@Naomi](https://forum.freecodecamp.org/u/Naomi)\
**Post date:** [May 26, 2024, 6:39am UTC](https://forum.freecodecamp.org/t/learn-basic-javascript-by-building-a-role-playing-game-step-141/692072/4 "2024-05-26T06:39:18Z")

</div>

Well, let’s think about it. The instructions specifically say:

> In the `update` function, change `text.innerText` to `text.innerHTML` .

Have you changed `text.innerText` to `text.innerHTML`? It doesn’t look like it. You have `text.innerText` twice now, in fact.

---

<div class="post-metadata">

**Author:** ![muhammadfahada2](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/muhammadfahada2/32/363168_2.png) [@muhammadfahada2](https://forum.freecodecamp.org/u/muhammadfahada2)\
**Post date:** [May 26, 2024, 6:43am UTC](https://forum.freecodecamp.org/t/learn-basic-javascript-by-building-a-role-playing-game-step-141/692072/5 "2024-05-26T06:43:13Z")

</div>

So whats the correct code for this

---

<div class="post-metadata">

**Author:** ![hasanzaib1389](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/hasanzaib1389/32/377602_2.png) [@hasanzaib1389](https://forum.freecodecamp.org/u/hasanzaib1389)\
**Post date:** [May 26, 2024, 8:14am UTC](https://forum.freecodecamp.org/t/learn-basic-javascript-by-building-a-role-playing-game-step-141/692072/6 "2024-05-26T08:14:04Z")

</div>

Hi there!  
Welcome to the FCC forum. We don’t give the solution, only provides you hints here on the forum. You need code and pass the challenge by yourself.

> [@Naomi](#):
>
> Have you changed `text.innerText` to `text.innerHTML`? It doesn’t look like it. You have `text.innerText` twice now, in fact.

Now tell, what’s you don’t understands in the above hint?  
@muhammadfahada2

---

<div class="post-metadata">

**Author:** ![Ricoxe](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ricoxe/32/359239_2.png) [@Ricoxe](https://forum.freecodecamp.org/u/Ricoxe)\
**Post date:** [June 9, 2024, 6:06pm UTC](https://forum.freecodecamp.org/t/learn-basic-javascript-by-building-a-role-playing-game-step-141/692072/7 "2024-06-09T18:06:17Z")

</div>

The answer is very simple, do not overthink, it doesnt look like the sample.

---

<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:** [December 9, 2024, 6:06am UTC](https://forum.freecodecamp.org/t/learn-basic-javascript-by-building-a-role-playing-game-step-141/692072/8 "2024-12-09T06:06:34Z")

</div>

Closed on December 9, 2024, 6:06am UTC

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