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

Check best practice #6

Open
Grandi0z opened this issue Jan 23, 2023 · 0 comments
Open

Check best practice #6

Grandi0z opened this issue Jan 23, 2023 · 0 comments

Comments

@Grandi0z
Copy link
Owner

const newArr = arr.filter((task) => task.description !== description);
arr = [...newArr];
return arr;

  • Could be short
    document.getElementById('taks_list').remove();
    document.getElementById('btn_clear').remove();
  • this code is repeated on lines 42, 43, 44 ; 50, 51, 52 and 65, 66, 68

if (arr.length) {
for (let i = 0; i < arr.length; i += 1) {

for (let i = 0; i < arr.length; i += 1) {

  • Could use forEarch instead
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