Skip to content
RED SAGSkills
medium10 pts · first answer countshtml-cssperformance

A slow loop that resizes cards

Why is this loop slow with 500 cards?

cards.forEach((c) => {
  c.style.height = "auto"
  c.style.height = c.offsetHeight + 10 + "px"
})
Choose one answer

Discussion 0

Join free to post in the discussion.

Related questions