Skip to main content
1 of 2

This is not how setInterval() works. You need to pass the function directly, like this:

setInterval(function() {
    if (copper < max) {
        copper++;
        document.getElementId('GC').innerHTML = copper;
    }
}, 1000);