mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-03-03 23:01:25 -05:00
chore(curriculum): add quotes to strings in todo app (#54008)
Co-authored-by: Huyen Nguyen <25715018+huyenltnguyen@users.noreply.github.com>
This commit is contained in:
@@ -7,7 +7,7 @@ dashedName: step-19
|
||||
|
||||
# --description--
|
||||
|
||||
Create a `p` element and use template strings to set its content to the `title` you destructured. Right before the content of the `p` element, create a `strong` element with the text `Title:`.
|
||||
Create a `p` element and use template strings to set its content to the `title` you destructured. Right before the content of the `p` element, create a `strong` element with the text `"Title:"`.
|
||||
|
||||
# --hints--
|
||||
|
||||
@@ -29,7 +29,7 @@ You should create a `strong` element after the opening tag of your `p` element.
|
||||
assert.match(code, /<p><strong>/)
|
||||
```
|
||||
|
||||
Your `strong` element should have the text `Title:`.
|
||||
Your `strong` element should have the text `"Title:"`.
|
||||
|
||||
```js
|
||||
assert.match(code, /<p><strong>Title:\s*<\/strong>\s*/)
|
||||
|
||||
@@ -7,7 +7,7 @@ dashedName: step-20
|
||||
|
||||
# --description--
|
||||
|
||||
Similarly to the previous step, create another `p` element, and interpolate the `date` you destructured as the text content. Inside this paragraph, create a `strong` element with the text `Date:`.
|
||||
Similarly to the previous step, create another `p` element, and interpolate the `date` you destructured as the text content. Inside this paragraph, create a `strong` element with the text `"Date:"`.
|
||||
|
||||
# --hints--
|
||||
|
||||
@@ -17,7 +17,7 @@ You should create a `p` element and interpolate `${date}` as the text.
|
||||
assert.match(code, /<p>.*\$\{date\}<\/p>/)
|
||||
```
|
||||
|
||||
You should create a `strong` element with the text `Date:` after the opening tag of your `p` element.
|
||||
You should create a `strong` element with the text `"Date:"` after the opening tag of your `p` element.
|
||||
|
||||
```js
|
||||
assert.match(code, /<p><strong>Date:\s*<\/strong>\s*/)
|
||||
|
||||
@@ -9,17 +9,17 @@ dashedName: step-22
|
||||
|
||||
To allow for task management, you need to include both a delete and an edit button for each task.
|
||||
|
||||
Create two `button` elements with the `type` attribute set to `button` and the `class` attribute set to `btn`. Set the text of the first button to `Edit` and the text of the second button to `Delete`.
|
||||
Create two `button` elements with the `type` attribute set to `button` and the `class` attribute set to `btn`. Set the text of the first button to `"Edit"` and the text of the second button to `"Delete"`.
|
||||
|
||||
# --hints--
|
||||
|
||||
You should create a `button` element of type `button`, a class `btn` and `Edit` as the text, in that order.
|
||||
You should create a `button` element of type `button`, a class `btn` and `"Edit"` as the text, in that order.
|
||||
|
||||
```js
|
||||
assert.match(code, /<button\s+type=('|")button\1\s+class=('|")btn\2>Edit<\/button/)
|
||||
```
|
||||
|
||||
You should create a `button` element of type `button` a class `btn` and `Delete` as the text, in that order.
|
||||
You should create a `button` element of type `button` a class `btn` and `"Delete"` as the text, in that order.
|
||||
|
||||
```js
|
||||
assert.match(code, /<button\s+type=('|")button\1\s+class=('|")btn\2>Delete<\/button/)
|
||||
|
||||
@@ -7,7 +7,7 @@ dashedName: step-21
|
||||
|
||||
# --description--
|
||||
|
||||
Create one more `p` element and interpolate the `description` you destructured as the text. Also, create a `strong` element inside the paragraph with the text `Description:`.
|
||||
Create one more `p` element and interpolate the `description` you destructured as the text. Also, create a `strong` element inside the paragraph with the text `"Description:"`.
|
||||
|
||||
# --hints--
|
||||
|
||||
@@ -17,7 +17,7 @@ You should create a `p` element with `${description}` as the text.
|
||||
assert.match(code, /<p>.*\$\{description\}<\/p>/)
|
||||
```
|
||||
|
||||
You should create a `strong` element with the text `Description:` after the opening tag of your `p` element.
|
||||
You should create a `strong` element with the text `"Description:"` after the opening tag of your `p` element.
|
||||
|
||||
```js
|
||||
assert.match(code, /<p><strong>Description:\s*<\/strong>\s*/)
|
||||
|
||||
@@ -9,10 +9,10 @@ dashedName: step-46
|
||||
|
||||
If you try to add a new task, edit that task, and then click on the `Add New Task` button, you will notice a bug.
|
||||
|
||||
The form button will display the incorrect text of `Update Task` instead of `Add Task`. To fix this, you will need to assign the string `Add Task` to `addOrUpdateTaskBtn.innerText` inside your `addOrUpdateTask` function.
|
||||
The form button will display the incorrect text of `"Update Task"` instead of `"Add Task"`. To fix this, you will need to assign the string `"Add Task"` to `addOrUpdateTaskBtn.innerText` inside your `addOrUpdateTask` function.
|
||||
# --hints--
|
||||
|
||||
You should assign the string `Add Task` to `addOrUpdateTaskBtn.innerText`.
|
||||
You should assign the string `"Add Task"` to `addOrUpdateTaskBtn.innerText`.
|
||||
|
||||
```js
|
||||
assert.match(code, /addOrUpdateTaskBtn\.innerText\s*=\s*('|")Add Task\1\s*/)
|
||||
|
||||
Reference in New Issue
Block a user