Files
2024-01-24 19:52:36 +01:00

1.4 KiB
Raw Blame History

id, title, challengeType, dashedName
id title challengeType dashedName
62a3a7e4f1060e2fc5ffb34b Step 9 0 step-9

--description--

Create another variable called currentWeapon and set it to 0.

Якщо змінна має пару слів, за правилами JavaScript потрібно використати верблюдячийРегістр. Перше слово пишеться з малої літери, а кожне наступне з великої.

let thisIsCamelCase;

--hints--

You should use let to declare a variable called currentWeapon.

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

Використайте верблюдячийРегістр, щоб назвати змінну.

assert.match(code, /currentWeapon/);

Ваша змінна currentWeapon повинна бути встановлена на 0.

assert.equal(currentWeapon, 0);

Ініціалізуйте змінну значенням 0.

assert.match(code, /let\s+currentWeapon\s*=\s*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;
let health = 100;
let gold = 50;
--fcc-editable-region--