Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Per to peer code review module02week03day02 #8

Open
s2jack opened this issue Jul 18, 2023 · 0 comments
Open

Per to peer code review module02week03day02 #8

s2jack opened this issue Jul 18, 2023 · 0 comments

Comments

@s2jack
Copy link

s2jack commented Jul 18, 2023

Hello @katarighe,
Good job, so far!

✅ No linter errors ✔️
✅ Repo looks professional 💼
✅ Good quality commits
✅ DRY, KISS and YAGNI rules
Required Changes ♻️
Check the comments under the review.

const deletemyTask = (targetIndex) => {
const filterTask = myTask.filter((task) => +task.index !== +targetIndex);
const newmyTask = filterTask.map((task, index) => ({
description: task.description,
completed: task.completed,
index: index + 1,
}));
localStorage.setItem('myTask', JSON.stringify(newmyTask));
myTask = newmyTask;
getmyTask();
};
export {
getmyTask,
// Line break here
addmyTask,
editmyTask,
deletemyTask,
myTask,
updateInterface,
};

You should consider to separate all your functions into another js files to use them as a module. It would increase your website running performance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant