DEV Community

Ahmad
Ahmad

Posted on

1 1

JS, Local Storage

Top comments (1)

Collapse
 
barakplasma profile image
Michael Salaverry

three small comments:
1) there's a typo on the results div on first load; shows "Resut" but should be "Result"
2) you add 4 event listeners for every button, which isn't a best practice. allBtns.forEach((btn) => { It would be better to target each button separately, since you already check for the class name of each button to add it's event handler.
3) try describing why this exists, and what you're trying to show us

The best way to debug slow web pages cover image

The best way to debug slow web pages

Tools like Page Speed Insights and Google Lighthouse are great for providing advice for front end performance issues. But what these tools can’t do, is evaluate performance across your entire stack of distributed services and applications.

Watch video