London | 26-ITP-January | Mouawia Elkhalifa | Sprint 3 | Todo list #1098
London | 26-ITP-January | Mouawia Elkhalifa | Sprint 3 | Todo list #1098MouawiaElkhalifa wants to merge 5 commits intoCodeYourFuture:mainfrom
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
be8ee45 to
f751313
Compare
This comment has been minimized.
This comment has been minimized.
f751313 to
2295841
Compare
| "description": "You must update this package", | ||
| "type": "module", | ||
| "scripts": { | ||
| "serve": "http-server", |
There was a problem hiding this comment.
Why did you remove the script? I can not test the code with the npm run serve command
There was a problem hiding this comment.
Hi, I’ve addressed the feedback.
Restored the serve script in package.json
There was a problem hiding this comment.
"Hi, I have now pushed the restored serve script in package.json
| } | ||
|
|
||
| // Remove all tasks that are marked as completed§ | ||
| export function deleteCompleted(todos) { |
There was a problem hiding this comment.
I don't see a button that on the webpage where I can trigger this code
There was a problem hiding this comment.
Hi, I’ve addressed the feedback.
Added a “Delete completed tasks” button to the UI
Connected the button to deleteCompleted(todos) so it removes completed tasks correctly
| for (let i = todos.length - 1; i >= 0; i--) { | ||
| if (todos[i].completed) { | ||
| todos.splice(i, 1); | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
The code works correctly. You can also research build in array funcitons that allow you to filter elements from an array
| "repository": { | ||
| "type": "git", | ||
| "url": "git+https://github.com/CodeYourFuture/CYF-Coursework-Template.git" | ||
| }, | ||
| "bugs": { | ||
| "url": "https://github.com/CodeYourFuture/CYF-Coursework-Template/issues" | ||
| }, | ||
| "homepage": "https://github.com/CodeYourFuture/CYF-Coursework-Template#readme", | ||
| "devDependencies": { | ||
| "http-server": "^14.1.1", | ||
| "jest": "^30.0.4" |
Learners, PR Template
Self checklist
[x] I have titled my PR with London | 26-ITP-January | Mouawia Elkhalifa | Sprint 3 | Todo List
[x] My changes meet the requirements of the task
[x] I have tested my changes
[x] My changes follow the style guide
Changelist
In this PR, I have completed the Todo List exercised