You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+20-2Lines changed: 20 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -137,11 +137,28 @@ In this project, you will help CamperBot build a random background color changer
137
137
Fix the error in the <code>darkColorsArr[getRandomIndex]</code> line so that the color variable is set to a random color from the <code>darkColorsArr</code> array.
138
138
</p>
139
139
</details>
140
+
<details>
141
+
<summary>
142
+
<h5>Step 7</h5>
143
+
</summary>
144
+
<p>
145
+
CamperBot is trying to create a new variable called <code>btn</code> to store the reference to the button element with the <code>id</code> of <code>click-btn</code>
146
+
</p>
147
+
<p>
148
+
However, when they try to log the button element to the console, they see that the button element is <code>null</code>.
149
+
</p>
150
+
<p>
151
+
Open up the <code>index.html</code> to see the correct <code>id</code> name for that button element.
152
+
</p>
153
+
<p>
154
+
Then fix the error for the <code>document.querySelector("#click-btn");</code> line.
155
+
</p>
156
+
</details>
140
157
</details>
141
158
142
159
#### preview
143
160
144
-

161
+

Copy file name to clipboardExpand all lines: __0__title__/README.md
+17Lines changed: 17 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -137,6 +137,23 @@ In this project, you will help CamperBot build a random background color changer
137
137
Fix the error in the <code>darkColorsArr[getRandomIndex]</code> line so that the color variable is set to a random color from the <code>darkColorsArr</code> array.
138
138
</p>
139
139
</details>
140
+
<details>
141
+
<summary>
142
+
<h5>Step 7</h5>
143
+
</summary>
144
+
<p>
145
+
CamperBot is trying to create a new variable called <code>btn</code> to store the reference to the button element with the <code>id</code> of <code>click-btn</code>
146
+
</p>
147
+
<p>
148
+
However, when they try to log the button element to the console, they see that the button element is <code>null</code>.
149
+
</p>
150
+
<p>
151
+
Open up the <code>index.html</code> to see the correct <code>id</code> name for that button element.
152
+
</p>
153
+
<p>
154
+
Then fix the error for the <code>document.querySelector("#click-btn");</code> line.
CamperBot is trying to create a new variable called <code>btn</code> to store the reference to the button element with the <code>id</code> of <code>click-btn</code>
10
+
</p>
11
+
<p>
12
+
However, when they try to log the button element to the console, they see that the button element is <code>null</code>.
13
+
</p>
14
+
<p>
15
+
Open up the <code>index.html</code> to see the correct <code>id</code> name for that button element.
16
+
</p>
17
+
<p>
18
+
Then fix the error for the <code>document.querySelector("#click-btn");</code> line.
19
+
</p>
20
+
</details>
21
+
22
+
# Random Background Color changer
23
+
24
+
Debugging is the process of going through your code, finding any issues, and fixing them.
25
+
26
+
In this project, you will help CamperBot build a random background color changer and help them find and fix errors.
27
+
28
+
#### preview
29
+
30
+

0 commit comments