I have code that is supposed to make a one-second-delayed loop, but it instead executes the code in the loop constantly.
loop1()
function loop1() {
setTimeout(loop2(), 1000)
}
function loop2() {
console.log("hey")
setTimeout(myLoop(), 1000)
}