Design comparison
Solution retrospective
My first time with JSON so please feedback are highly appreciated :D
Community feedback
- @isprutfromuaPosted over 2 years ago
Hi there. You did a good job 😎
keep improving your programming skills🛠️
your solution looks great, however, if you want to improve it, you can follow these steps:
✅ instead of duplicating a large chunk of code, you can place all the elements in an array and iterate it by setting the appropriate values
✅ use code formatters for structuring your code. It’s very important. As programs get more complex, they get harder and harder to understand - and at some point you can’t even understand code that you yourself wrote without being able to re-read it. Good style makes reading code a pleasurable and consistent experience.
clicked = e.target.textContent; clicks = e.target; if(clicked.length < 8){ if(document.querySelector(".active")){ document.querySelector(".active").classList.remove("active"); }else{} }else{} clicks.classList.add("active"); fetch("data.json") .then(function(response) { return response.json(); })
✅ You Should Stop Using Pixels. They are static and aren’t truly relative to the root font-size like REM and EM units. Fixed sizes it's also bad idea for dynamic content.
.contain{ flex-basis: 31.54%; height: 190px; margin-bottom: 0px; } .person{ display: flex; flex-flow: column nowrap; flex-basis: 23.5%; height: 400px; }
Good luck and fun coding 🤝⌨️
0
Please log in to post a comment
Log in with GitHubJoin 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