Skip to content

Commit 136ecd1

Browse files
committed
'Random Background Color Changer' docs: README.md update main add description step-2 (variation_2)
1 parent 737b6c0 commit 136ecd1

2 files changed

Lines changed: 46 additions & 0 deletions

File tree

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,28 @@ In this project, you will help CamperBot build a random background color changer
1010
<summary>
1111
<h4>Description of the Tasks</h4>
1212
</summary>
13+
<details>
14+
<summary>
15+
<h5>Step 2</h5>
16+
</summary>
17+
<p>
18+
Now, CamperBot is trying to create a function that will return a random index from the <code>darkColorsArr</code>. But they have run into the following error message:
19+
</p>
20+
<details>
21+
<summary>
22+
<h5>Example Code</h5>
23+
</summary>
24+
<code>
25+
Uncaught ReferenceError: math is not defined
26+
</code>
27+
</details>
28+
<p>
29+
A <code>ReferenceError</code> is thrown when a non-existent variable is referenced. In this case, it looks like CamperBot is trying to use <code>math</code> but JavaScript doesn't have a <code>math</code> object.
30+
</p>
31+
<p>
32+
Fix CamperBot's error in the <code>math.random()</code> line and open up the console again.
33+
</p>
34+
</details>
1335
<details>
1436
<summary>
1537
<h5>Step 3</h5>

__2__step__/README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,29 @@
11
<a id=top></a>
22

3+
<details>
4+
<summary>
5+
<h4>Description of the task</h4>
6+
</summary>
7+
<h3>Step 2</h3>
8+
<p>
9+
Now, CamperBot is trying to create a function that will return a random index from the <code>darkColorsArr</code>. But they have run into the following error message:
10+
</p>
11+
<details>
12+
<summary>
13+
<h5>Example Code</h5>
14+
</summary>
15+
<code>
16+
Uncaught ReferenceError: math is not defined
17+
</code>
18+
</details>
19+
<p>
20+
A <code>ReferenceError</code> is thrown when a non-existent variable is referenced. In this case, it looks like CamperBot is trying to use <code>math</code> but JavaScript doesn't have a <code>math</code> object.
21+
</p>
22+
<p>
23+
Fix CamperBot's error in the <code>math.random()</code> line and open up the console again.
24+
</p>
25+
</details>
26+
327
# Random Background Color changer
428

529
Debugging is the process of going through your code, finding any issues, and fixing them.

0 commit comments

Comments
 (0)