So, you’ve already exported the constant term that will allow us to control the terminal.
Let’s make some use of it!

  • Create the file functions.js and export the function init from it.
  • Function init should have a single parameter term.
  • Import the function init into gameEngine.js and call it from the function startMiningGame.
  • Add the parameter term to the function startMiningGame.
  • Import the constant term into solution.js from constants.js, pass it into startMiningGame and then into init.
  • Inside of the init function, add the line term('Welcome to the mining game!').

As a result, you should see the message Welcome to the mining game! printed on the screen
P.S. term should ONLY be imported into solution.js.

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.