function horse(input){ let a1 = document.getElementById("audio1"); if (input){ a1.play(); } else {a1.pause();} } var round = 1; /* function moveHorse() { window.setTimeout(function() { console.log("halo"); addclass() moveHorse() }, 3900); } function addclass(elem){ let list = document.getElementById('hest1'); console.log(list.classList); if(round%2===0){ list.classList.remove('moved'); } else{ list.classList.add('moved'); console.log("halo"); } round++; console.log("halo"); } moveHorse (); */