Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Responsive Mobile First Component

@jchapar

Desktop design screenshot for the Results summary component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


Hello Everyone, I have the data being fetched from the json file. Any feedback regarding my JS code, or any code, would be greatly appreciated!

Community feedback

P
visualdennis 8,295

@visualdenniss

Posted

Hey there,

good work complating the challenge successfully! There seems to be a bit too much empty space under the paragraph text on the left column. You might consider aligning it closer to the bottom part and distribute the space between elements more evenly or balanced.

Its great that you render elements dynamically. However this part seems a bit hard-coded: data.forEach((item) => { const categoryEl = document.createElement('div')

    switch (item.category) {
      case 'Reaction':
        categoryEl.classList.add('category', 'reaction')
        break
      case 'Memory':
        categoryEl.classList.add('category', 'memory')
        break
      case 'Verbal':
        categoryEl.classList.add('category', 'verbal')
        break
      case 'Visual':
        categoryEl.classList.add('category', 'visual')
        break
      default:
        break
    }

Imagine if more and newer data would have been added to the database, how would you scale it up? You can consider refactoring it to make it more scalable, using functions and params.

Hope you find this feedback helpful!

Marked as helpful

0

Please log in to post a comment

Log in with GitHub
Discord logo

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