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

Tell us what’s happening:

It states to create a variable ncalled camperbot and give it the value “xp” but when I do this it claims the variable hasn’t been created despite me writing the code properly.
let camperbot = “xp”;

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>
  <body>
    <div id="game">
    </div>
  </body>
</html>
/* file: script.js */

// User Editable Region

let camperbot = "xp";

// 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 Edg/123.0.0.0

Challenge Information:

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

Hi there and welcome to our community!

Declare a variable called xp .

The variable camperbot was an example, not an instruction.
Follow the syntax of the example but use the variable name xp instead of camperbot.

1 Like

Ohhh, thank you I feel so dumb

1 Like