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

Tell us what’s happening:

please help me please help me figure out what im doing wrong

Your code so far

<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <link rel="stylesheet" href="./styles.css">
    <title>RPG - Dragon Repeller</title>
    <script src="./script.js"></script>
  </head>

<!-- User Editable Region -->

  <body>
    <div id="game"> <div id="stats" div id="controls" div id="monsterStats" div id="text"></div>
  </body>

<!-- User Editable Region -->

</html>
/* file: script.js */
let xp = 0;
let health = 100;
let gold = 50;
let currentWeaponIndex = 0;
let fighting;
let monsterHealth;
let inventory = ["stick"];

Your browser information:

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

Challenge Information:

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

Hi @Sinan, nice to meet you again!

the direction tells that you need to create 4 div elements and add their corresponding IDs.

based on you code, specifically this part:

it seems you just compiled them into a single div, which is wrong.

you need to separate them into 4 div elements.

1 Like

if you are not familiar with creating html elements I suggest going to the Responsive Web Design course, or going to the Certified Full Stack Developer curriculum

I solved it. I figured it out. Thanks!

2 Likes