My fade-in animation just freezes halfway, any ideas?
function fadeIn(el) {
let opacity = 0;
function step() {
opacity += 0.05;
el.style.opacity = opacity;
if (opacity < 1) {
requestAnimationFrame(step);
}
}
step;
}
fadeIn(document.querySelector('.box'));
Reply with what is broken and how you would fix it.