mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
fix(curriculum): cleaning up grammar and adding missing explanations for todo app project (#52369)
Co-authored-by: Huyen Nguyen <25715018+huyenltnguyen@users.noreply.github.com>
This commit is contained in:
+2
-2
@@ -9,7 +9,7 @@ dashedName: step-6
|
||||
|
||||
Now, you will work on opening and closing the form modal.
|
||||
|
||||
Add a `click` event listener to the `openTaskFormBtn` variable, and then use `classList` to toggle the `hidden` class on the `taskForm` element.
|
||||
Add a `click` event listener to the `openTaskFormBtn` variable, and then use `classList` to toggle the `hidden` class on the `taskForm` element. Make sure not to include curly braces in your arrow function.
|
||||
|
||||
Now you can click on the "Add new Task" button and see the form modal.
|
||||
|
||||
@@ -27,7 +27,7 @@ Your event listener should listen for a `click` event.
|
||||
assert.match(code, /openTaskFormBtn\.addEventListener\(('|"|`)click\1/)
|
||||
```
|
||||
|
||||
Your event listener should use arrow syntax, then use `classList` property and it's `toggle` method on the `taskForm`, to toggle the class `hidden`. Don't use curly braces.
|
||||
Your event listener should include a callback function for the second argument using arrow syntax without curly braces. Then you should use the `classList` property and its `toggle` method on the `taskForm`, to toggle the class `hidden`.
|
||||
|
||||
```js
|
||||
assert.match(code, /openTaskFormBtn\.addEventListener\(('|"|`)click\1\,\s*\(\)\s*\s*=>\s*taskForm\.classList\.toggle\(\1hidden\1\)\s*\);?/)
|
||||
|
||||
+7
-1
@@ -7,7 +7,13 @@ dashedName: step-13
|
||||
|
||||
# --description--
|
||||
|
||||
To make the `id` more unique, add another hyphen and use `Date.now()`.
|
||||
To make the `id` more unique, add another hyphen and use <dfn>Date.now()</dfn>.
|
||||
|
||||
`Date.now()` returns the number of milliseconds elapsed since January 1, 1970 00:00:00 UTC.
|
||||
|
||||
```js
|
||||
console.log(Date.now()); // 1628586800000
|
||||
```
|
||||
|
||||
# --hints--
|
||||
|
||||
|
||||
Reference in New Issue
Block a user