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

Do I follow JavaScript best practices? #5

Open
6 tasks
musangamfure opened this issue May 9, 2023 · 0 comments
Open
6 tasks

Do I follow JavaScript best practices? #5

musangamfure opened this issue May 9, 2023 · 0 comments

Comments

@musangamfure
Copy link
Owner

According to JavaScript Best Practices, DRY, KISS, YAGNI, and HTML & CSS:

Here are some issues related to JavaScript best practices:

  • The code has a mix of arrow functions and traditional functions. It is recommended to be consistent with the use of arrow functions throughout the code.
  • Redundant code: The saveTodoItems() function is called twice in the addTodo() function.
  • Unused imported module: The checkboxCheck module is imported but not used anywhere in the code
  • Code repetition: The toggleDeleteIcon function is defined twice in the code, once as an imported module and once within the same file.
  • Large functions: Some functions, such as displayTodoItems() and addTodo(), are quite large and could be refactored into smaller, more modular functions

Here are the issues related to HTML and CSS best practices:

  • Lack of semantic HTML: The code uses div and li elements without any semantic meaning, which can make the code harder to understand and maintain
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