Event Listeners & Handlers

What's the best practice for handling frequent events like 'resize' or 'scroll'?
window.addEventListener('resize', function() {
  // Heavy computation
}, { passive: true });
Next Question (12/20)