I have this function that can handle everything I need for my program, but I just need a way to add to the bottom something that can make the function repeat itself.
function main(){
var scoreCounter= 0
var random= Math.floor((Math.random() * 10) + 1)
currentTarget= targets[random]
currentTarget.style.display= "block"
currentTarget.addEventListener("click", function(){
currentTarget.style.display= "none"
scoreCounter+=1
aimHero.innerHTML= "Score: " + scoreCounter
})
}