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

Tell us what’s happening: what is the problem? i didnt get what im doing wrong:) how should it look like?

Beschreibe hier dein Problem im Detail.

Your code so far

<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
    <meta charset="utf-8">
    <link rel="stylesheet" href="./styles.css">
    <title>RPG - Dragon Repeller</title>
    <div id="game">
      <div id="stats">

<!-- User Editable Region -->

        <strong><span class="stat">XP:<strong><span> 0</span></strong></span></strong>
        <strong><span class="stat">Health:<span> 100</span></span></strong>
        <strong><span class="stat">Gold:<span> 50</span></span></strong>
        <strong><span id="xpText"></span></strong>
        <span id="healthText"></span>
        <span id="goldText"></span>

<!-- User Editable Region -->

      <div id="controls"></div>
      <div id="monsterStats"></div>
      <div id="text"></div>
/* file: script.js */
let xp = 0;
let health = 100;
let gold = 50;
let currentWeapon = 0;
let fighting;
let monsterHealth;
let inventory = ["stick"];

Your browser information:

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

Challenge Information:

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

Please talk to us about how the instructions or error message is confusing. Thanks

Welkom op het forum @chhr21

Reset de stap om de originele code te herstellen.

Begin vervolgens met het nesten van de elementen rond de cijfers.

Nest het getal eerst in een span element.
Nest dat span-element vervolgens in een sterk-element.

Veel codeerplezier

1 Like