mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
refactor(curriculum): remove errors from Build a Cat Blog page workshop (#58744)
This commit is contained in:
+1
-1
@@ -72,7 +72,7 @@ Your `ul` element should contain three `li` elements.
|
||||
```js
|
||||
const ulElement = document.querySelector("ul");
|
||||
|
||||
const liElements = ulElement.querySelectorAll("li");
|
||||
const liElements = ulElement?.querySelectorAll("li");
|
||||
assert.strictEqual(liElements?.length, 3);
|
||||
```
|
||||
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ You should have two `p` elements inside your `address` element.
|
||||
|
||||
```js
|
||||
const addressElement = document.querySelector('footer #contact address');
|
||||
const pElements = addressElement.querySelectorAll('p');
|
||||
const pElements = addressElement?.querySelectorAll('p');
|
||||
|
||||
assert.lengthOf(pElements, 2);
|
||||
```
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ Your first paragraph should have the text of `Hi there! I'm Jane Doe, a passiona
|
||||
```js
|
||||
const pElement = document.querySelector('body p:first-of-type');
|
||||
const text = "Hi there! I'm Jane Doe, a passionate writer who finds endless inspiration in the antics of my beloved cat, Mr. Whiskers."
|
||||
assert.strictEqual(pElement.innerText, text);
|
||||
assert.strictEqual(pElement?.innerText, text);
|
||||
```
|
||||
|
||||
Your first paragraph should be nested inside the `section` element.
|
||||
|
||||
Reference in New Issue
Block a user