From 14f9dbf9656266fc14dffc53b19563258a189cc1 Mon Sep 17 00:00:00 2001 From: Jessica Wilkins <67210629+jdwilkin4@users.noreply.github.com> Date: Mon, 27 Nov 2023 23:56:52 -0800 Subject: [PATCH] fix(curriculum): small errors in tests and spelling for JS TODO app project (#52438) --- .../64faf0418e828c0114a558a7.md | 2 +- .../64fb0fa0968f2b113b2d90e9.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-localstorage-by-building-a-todo-app/64faf0418e828c0114a558a7.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-localstorage-by-building-a-todo-app/64faf0418e828c0114a558a7.md index 7054c53b763..c1587bd2c7f 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-localstorage-by-building-a-todo-app/64faf0418e828c0114a558a7.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-localstorage-by-building-a-todo-app/64faf0418e828c0114a558a7.md @@ -9,7 +9,7 @@ dashedName: step-34 There's a problem. If you add a task, and then add another, the previous task gets duplicated. This means you need to clear out the existing contents of `tasksContainer` before adding a new task. -Set the `innerHTML` of `taskContainer` back to an empty string. +Set the `innerHTML` of `tasksContainer` back to an empty string. # --hints-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-localstorage-by-building-a-todo-app/64fb0fa0968f2b113b2d90e9.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-localstorage-by-building-a-todo-app/64fb0fa0968f2b113b2d90e9.md index b4c2acac6da..c470a62c8af 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-localstorage-by-building-a-todo-app/64fb0fa0968f2b113b2d90e9.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-localstorage-by-building-a-todo-app/64fb0fa0968f2b113b2d90e9.md @@ -28,13 +28,13 @@ assert.match(code, /const\s*editTask\s*=\s*\(buttonEl\)\s*=>\s*\{\s*const dataAr You should pass in `item` as the parameter of the `findIndex()` arrow function callback. Don't use curly braces. ```js -assert.match(code, /const\s*editTask\s+=\s*\(buttonEl\)\s*=>\s*\{\s*const\s+dataArrIndex\s*=\s*taskData\.findIndex\(\(item\)/) +assert.match(code, /const\s*editTask\s+=\s*\(buttonEl\)\s*=>\s*\{\s*const\s+dataArrIndex\s*=\s*taskData\.findIndex\(\s*\(?item\)?/) ``` Your arrow function callback should check if `item.id === buttonEl.parentElement.id`. ```js -assert.match(code, /const\s*editTask\s+=\s*\(buttonEl\)\s*=>\s*\{\s*const\s+dataArrIndex\s*=\s*taskData\.findIndex\(\(item\)\s*=>\s*item\.id\s*===\s*buttonEl\.parentElement\.id\);?\s*\};?/) +assert.match(code, /const\s*editTask\s+=\s*\(buttonEl\)\s*=>\s*\{\s*const\s+dataArrIndex\s*=\s*taskData\.findIndex\(\s*\(?item\)?\s*=>\s*item\.id\s*===\s*buttonEl\.parentElement\.id\);?\s*\};?/) ``` # --seed--