@md5dalton
Posted
Hi Sreehari, Good work on the challenge.
I just want to point out that in your future projects try to make your code DRY (Don't repeat yourself) - that is is a principle of software development aimed at reducing repetition of software patterns.
I'll give you an example. I noticed document.querySelector()
has been repeated quite a couple of times. My suggestion would be to write a helper function const getDOM = selector => document.querySelector(selector)
and you can use that function where you need that functionality anywhere in your script.
This is a small project, the advantages may not be that apparent.
Marked as helpful