Congratulations on passing the stage 3!
You might be wondering why we have 4 files, a third party module and quite a few lines of code to output
a single message on the screen… And the answer is that this structure will allow our code to be flexible,
easy to modify and maintain. Ultimately the payoff will be evident.
Before we can let our user mine gold, we need a place to store it.
- Let’s create an object
config
with the single propertygold
with the value 0. - Export
config
from theconstants.js
, import it intosolution.js
and pass intostartMiningGame
as a second parameter.
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.