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

Morning session | Peer to peer code review #3

Open
harlexkhal opened this issue Feb 11, 2022 · 0 comments
Open

Morning session | Peer to peer code review #3

harlexkhal opened this issue Feb 11, 2022 · 0 comments

Comments

@harlexkhal
Copy link

harlexkhal commented Feb 11, 2022

  • [Optional] using so many functions in your Javascripts codes breaks the rule of OOD (object oriented design) pattern of the application, you could put all of those functions into your class, making them methods, and calling every method that needs to be initialized from a class constructor

  • while creating html elements dynamically with javascript it would be better using innerHTML than creating each element and adding it to the previous one using appendChild(), because subsequent call to dom elements is less optimized.

  • Having your time update on page refresh doesn't utilize the flexibility of live update functionality JavaScript gives you. You could use a JS setinterval functionality to update time every second. note: which could be less optimized but its a small price to pay for dynamicity

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