mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-13 06:04:13 -04:00
60 lines
1.0 KiB
Markdown
60 lines
1.0 KiB
Markdown
---
|
|
id: 62a3b3eab50e193608c19fc6
|
|
title: الخطوة 10
|
|
challengeType: 0
|
|
dashedName: step-10
|
|
---
|
|
|
|
# --description--
|
|
|
|
Declare a variable called `fighting` but do not initialize it with a value. Remember to end your line with a semi-colon.
|
|
|
|
# --hints--
|
|
|
|
You should use `let` to declare a variable `fighting`.
|
|
|
|
```js
|
|
assert.match(code, /let\s+fighting/);
|
|
```
|
|
|
|
Your `fighting` variable should not have a value.
|
|
|
|
```js
|
|
assert.isUndefined(fighting);
|
|
```
|
|
|
|
You should not assign a value to your `fighting` variable. Don't forget the semi-colon at the end of the line.
|
|
|
|
```js
|
|
assert.match(code, /let\s+fighting;/);
|
|
```
|
|
|
|
# --seed--
|
|
|
|
## --seed-contents--
|
|
|
|
```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>
|
|
```
|
|
|
|
```js
|
|
--fcc-editable-region--
|
|
let xp = 0;
|
|
let health = 100;
|
|
let gold = 50;
|
|
let currentWeapon = 0;
|
|
--fcc-editable-region--
|
|
```
|