mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-06-19 21:09:51 +08:00
chore(curriculum): make step 14 cat photo app clearer (#57437)
This commit is contained in:
parent
6889068d44
commit
e7f43df0eb
@ -7,7 +7,7 @@ dashedName: step-14
|
||||
|
||||
# --description--
|
||||
|
||||
Turn the text `cute cats` into an anchor elements that links to `https://cdn.freecodecamp.org/curriculum/cat-photo-app/running-cats.jpg`.
|
||||
Turn the existing text `cute cats` into an anchor elements that links to `https://cdn.freecodecamp.org/curriculum/cat-photo-app/running-cats.jpg`.
|
||||
|
||||
# --hints--
|
||||
|
||||
@ -29,6 +29,12 @@ The `href` attribute of the new anchor element should be `https://cdn.freecodeca
|
||||
assert.strictEqual(document.querySelector('a')?.href, "https://cdn.freecodecamp.org/curriculum/cat-photo-app/running-cats.jpg");
|
||||
```
|
||||
|
||||
There should only be one instance of the phrase `cute cats` in your code.
|
||||
|
||||
```js
|
||||
assert.strictEqual(code.indexOf("cute cats"),code.lastIndexOf("cute cats"));
|
||||
```
|
||||
|
||||
The text of the `p` element should still be `Everyone loves cute cats online!`.
|
||||
|
||||
```js
|
||||
|
||||
@ -7,7 +7,7 @@ dashedName: step-14
|
||||
|
||||
# --description--
|
||||
|
||||
Turn the text `cute cats` into an anchor elements that links to `https://cdn.freecodecamp.org/curriculum/cat-photo-app/running-cats.jpg`.
|
||||
Turn the existing text `cute cats` into an anchor elements that links to `https://cdn.freecodecamp.org/curriculum/cat-photo-app/running-cats.jpg`.
|
||||
|
||||
# --hints--
|
||||
|
||||
@ -29,6 +29,12 @@ The `href` attribute of the new anchor element should be `https://cdn.freecodeca
|
||||
assert.strictEqual(document.querySelector('a')?.href, "https://cdn.freecodecamp.org/curriculum/cat-photo-app/running-cats.jpg");
|
||||
```
|
||||
|
||||
There should only be one instance of the phrase `cute cats` in your code.
|
||||
|
||||
```js
|
||||
assert.strictEqual(code.indexOf("cute cats"),code.lastIndexOf("cute cats"));
|
||||
```
|
||||
|
||||
The text of the `p` element should still be `Everyone loves cute cats online!`.
|
||||
|
||||
```js
|
||||
|
||||
Loading…
Reference in New Issue
Block a user