So I am trying to make a clicker game. I have a cookies per second variable, and I what to add it to the total cookies every second using
setTimeout. For some reason, it will add it once,then stop.
Am I not doing the syntax right for
the syntax expects a function, but not for you to call the function. If you did that, what happens is js calls the function and uses the value the function returns as the function in setTimeout, meaning nothing happens.