Foundations & Tooling Quiz Practice
Active Recall Drill Session
← Exit SessionQuestion 1 of 1
hardFoundations & Tooling
What does the following code cause, and why is it a performance problem?
code
const boxes = document.querySelectorAll('.box');
boxes.forEach(box => {
const w = box.offsetWidth;
box.style.width = w * 2 + 'px';
});