From d177afa037f37940ab4d4758ced36719e35ddf4d Mon Sep 17 00:00:00 2001 From: Jessica Wilkins <67210629+jdwilkin4@users.noreply.github.com> Date: Wed, 15 Nov 2023 23:56:29 -0800 Subject: [PATCH] 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> --- .../64e4e78a7ea4a168de4e6a38.md | 4 ++-- .../650300a25b6f72964ab8aca6.md | 8 +++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-localstorage-by-building-a-todo-app/64e4e78a7ea4a168de4e6a38.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-localstorage-by-building-a-todo-app/64e4e78a7ea4a168de4e6a38.md index 7eba2896bf4..af50b65f161 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-localstorage-by-building-a-todo-app/64e4e78a7ea4a168de4e6a38.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-localstorage-by-building-a-todo-app/64e4e78a7ea4a168de4e6a38.md @@ -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*\);?/) diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-localstorage-by-building-a-todo-app/650300a25b6f72964ab8aca6.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-localstorage-by-building-a-todo-app/650300a25b6f72964ab8aca6.md index 6b21e6888ce..db84b740f78 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-localstorage-by-building-a-todo-app/650300a25b6f72964ab8aca6.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-localstorage-by-building-a-todo-app/650300a25b6f72964ab8aca6.md @@ -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 Date.now(). + +`Date.now()` returns the number of milliseconds elapsed since January 1, 1970 00:00:00 UTC. + +```js +console.log(Date.now()); // 1628586800000 +``` # --hints--