Skip to main content
added 2 characters in body
Source Link

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

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

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);

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

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

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);