mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-04-18 19:00:54 -04:00
fix(curriculum): misleading hint on Step 28 of Cat Photo App (#45994)
* Fix misleading hint on Step 28 * Require a src element for image * Allow more than 2 figure elements * Fix mistake with inequalities * Change 4th test to only require an img element
This commit is contained in:
@@ -14,13 +14,13 @@ Inside the `figure` element you just added, nest an `img` element with a `src` a
|
||||
Your second `figure` element should have an opening tag. Opening tags have this syntax: `<elementName>`.
|
||||
|
||||
```js
|
||||
assert(document.querySelectorAll('figure').length === 2);
|
||||
assert(document.querySelectorAll('figure').length >= 2);
|
||||
```
|
||||
|
||||
Your second `figure` element should have a closing tag. Closing tags have a `/` just after the `<` character.
|
||||
|
||||
```js
|
||||
assert(code.match(/<\/figure>/g).length === 2);
|
||||
assert(code.match(/<\/figure>/g).length >= 2);
|
||||
```
|
||||
|
||||
There should be a second `figure` element right above the second `section` element's closing tag. You have them in the wrong order.
|
||||
@@ -34,8 +34,7 @@ You should have a third `img` element nested in the `figure` element.
|
||||
```js
|
||||
const catsImg = document.querySelectorAll('figure > img')[1];
|
||||
assert(
|
||||
catsImg &&
|
||||
catsImg.getAttribute('src').toLowerCase() === 'https://cdn.freecodecamp.org/curriculum/cat-photo-app/cats.jpg'
|
||||
catsImg
|
||||
);
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user