Files

1.3 KiB

id, title, challengeType, dashedName
id title challengeType dashedName
62a3a75d8466a12e009eff76 Step 7 0 step-7

--description--

Initialize another variable called health with a value of 100, and a variable called gold with a value of 50.

--hints--

You should use let to declare a variable called health.

assert.match(code, /let\s+health/);

You should initialize a variable called health with a value of 100.

assert.match(code, /let\s+health\s*=\s*100/);

You should use let to declare a variable called gold.

assert.match(code, /let\s+gold/);

You should initialize a variable called gold with a value of 50.

assert.match(code, /let\s+gold\s*=\s*50/);

health should have a value of 100.

assert.equal(health, 100);

gold should have a value of 50.

assert.equal(gold, 50);

xp should still have a value of 0.

assert.equal(xp, 0);

--seed--

--seed-contents--

<!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>
--fcc-editable-region--
let xp = 0;
--fcc-editable-region--