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.jsand export the function
initshould have a single parameter
- Import the function
gameEngine.jsand call it from the function
- Add the parameter
termto the function
- Import the constant
constants.js, pass it into
startMiningGameand then into
- Inside of the
initfunction, 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
term should ONLY be imported into
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.