Expenses Chart w/ SASS & Vanilla JS

Solution retrospective
Anything you find that I can improve on, please let me know! Can't get better without critique and I don't want to cement any bad habits!
Cheers!
Please log in to post a comment
Log in with GitHubCommunity feedback
- @Eileenpk
Hi Robert! your project looks good, and this might be a helpful tip.
In your HTML, you have nested
<main>
tags. It is best practice to only have one per page as screen readers and SEO uses the landmark tag to let users and bots know that this is the "main" content of the page.Also in your JS you have
const dynamic = document.getElementById("chart"); if (dynamic) { ... }
I think you can take out the if statement because you have hard-coded the id=dynamic in your HTML and so it will always be a true value.
Here is a link to learn more about semantic elements. https://www.w3schools.com/html/html5_semantic_elements.asp
Hope you found this helpful!
- Let's connect on LinkedIn! - @Eileenpk
Marked as helpful
Join our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord