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

i should declare a variable named xp
on script.js

<!-- 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



// 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/122.0.0.0 Safari/537.36 Edg/122.0.0.0

Challenge Information:

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

Hello @Mercedes-ri,

In your script.js file add a let keyword!
Then in your let add a variable called xp!
And add ;at the end!

Happy coding!

1 Like

Hi there! Just follow the example:

let camperbot;

The first world is a keyword which is necessary, then put a variable name

thabks i can beliave is that simple :woman_facepalming:

Good job @Mercedes-ri ,
I think you have passed the step!

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