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
configwith the single property
goldwith the value 0.
constants.js, import it into
solution.jsand pass into
as a second parameter.
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.