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

Coding partner following JS best practices #7

Open
5 tasks
M-AminAlizadeh opened this issue May 12, 2023 · 0 comments
Open
5 tasks

Coding partner following JS best practices #7

M-AminAlizadeh opened this issue May 12, 2023 · 0 comments

Comments

@M-AminAlizadeh
Copy link
Contributor

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

Here are some issues related to JavaScript best practices:

  • Use of document to access the DOM: The code uses document to access the DOM, which is not efficient and can slow down the application. A better approach would be to use a variable to store the element and then access it when needed.
  • Unclear variable names: Some of the variable names used in the code are unclear and don't follow best practices for naming conventions. For example, Add and Remove don't accurately describe what the functions do.
  • Inefficient code: The code could be made more efficient in certain areas. For example, the Display function is called multiple times, even when there is no need to update the display specifically in ClearAll. function.

The HTML code seems well-structured and follows best practices. However, here are a few suggestions:

  • Use semantic HTML tags to improve the readability and structure of the page. For example, use for the header, for the main content area,
    for the different sections, for navigation, for the footer,
  • Add alt text to the element for better accessibility.

Thanks.

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