At the moment, we’re updating the UI once a second. It’s ok, but it’d be a lot smoother if it was updating
more often. Let’s say 10 times faster.
You’ll need to change the code in quite a few places,
so let’s add a property tickSpeed
to our config
object to make the transition to a different refresh rate smooth and easy.
Start by passing tickSpeed
as as second parameter to setInterval
and then think about what should you do next.
Remember, that you should also account for a tickSpeed
change in the amount of gold you add to the bank on each tick.
This task is part of the Full-Stack JavaScript Course.
If you have any issues with it, you can ask for community help below the post.
Feel free to help others if you’ve already solved the task.