mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-04-12 10:00:39 -04:00
fix(curriculum): trim spaces in Build a Storytelling App (#63951)
This commit is contained in:
@@ -17,8 +17,9 @@ Begin by creating an `h1` element and give it a text `Want to hear a short story
|
||||
You should have an `h1` with the text `Want to hear a short story?`.
|
||||
|
||||
```js
|
||||
assert.exists(document.querySelector('h1'));
|
||||
assert.equal(document.querySelector('h1').textContent, 'Want to hear a short story?');
|
||||
const h1 = document.querySelector('h1');
|
||||
assert.exists(h1);
|
||||
assert.equal(h1.textContent.trim(), 'Want to hear a short story?');
|
||||
```
|
||||
|
||||
# --seed--
|
||||
|
||||
@@ -26,22 +26,25 @@ assert.equal(document.querySelectorAll('.btn-container > .btn').length, 3);
|
||||
You should have a button with the `id` of `scary-btn` and a text of `Scary Story`.
|
||||
|
||||
```js
|
||||
assert.exists(document.querySelector('#scary-btn'));
|
||||
assert.equal(document.querySelector('#scary-btn').textContent, 'Scary Story');
|
||||
const scaryBtn = document.querySelector('#scary-btn');
|
||||
assert.exists(scaryBtn);
|
||||
assert.equal(scaryBtn.textContent.trim(), 'Scary Story');
|
||||
```
|
||||
|
||||
You should have a button with the `id` of `funny-btn` and a text of `Funny Story`.
|
||||
|
||||
```js
|
||||
assert.exists(document.querySelector('#funny-btn'));
|
||||
assert.equal(document.querySelector('#funny-btn').textContent, 'Funny Story');
|
||||
const funnyBtn = document.querySelector('#funny-btn');
|
||||
assert.exists(funnyBtn);
|
||||
assert.equal(funnyBtn.textContent.trim(), 'Funny Story');
|
||||
```
|
||||
|
||||
You should have a button with the `id` of `adventure-btn` and a text of `Adventure Story`.
|
||||
|
||||
```js
|
||||
assert.exists(document.querySelector('#adventure-btn'));
|
||||
assert.equal(document.querySelector('#adventure-btn').textContent, 'Adventure Story');
|
||||
const adventureBtn = document.querySelector('#adventure-btn');
|
||||
assert.exists(adventureBtn);
|
||||
assert.equal(adventureBtn.textContent.trim(), 'Adventure Story');
|
||||
```
|
||||
|
||||
# --seed--
|
||||
|
||||
Reference in New Issue
Block a user