제로초님!! 안녕하세요! 좋은 강의 항상 잘 듣고 있습니다.
다름이 아니라
저는 function에 setTimeout도 반복된다고 생각해서 같이 넣었는데 혹시 setTimeout을 함수에 넣었을 때 성능 저하나 다른 이유가 있어서 function만드실 때 따로 빼신 이유가 있을까요??
function view(component, index, time) {
setTimeout(() => {
const $ball = document.createElement("div");
$ball.setAttribute("class", "ball");
$ball.textContent = `${winBalls[index]}`;
component.appendChild($ball);
}, time);
}