SyntaxFix
Write A Post
Hire A Developer
Questions
Don't pass the result of swapImages to setInterval by invoking it. Just pass the function, like this:
swapImages
setInterval
setInterval(swapImages, 1000);