This is a fun quiz to test my close-friends and family on how well they know me.
-
- This is the main module that connects all modules and makes calls to functions in other modules.
- This module calles the welcome function in the
welcome.js
module, which welcomes the user to the game. - The
questions.js
module contains 10 questions in the form of an array of object - The
quiz.js
module displays questions, allows user to enter their choice, checks the answer and also updates score. - This module then finally displays score card for the user, and exits the game.
-
- This module has a
welcome()
method that asks for the user's name and then displays instructions after importing them from theinstructions.js
module. - The user is also asked whether they want to start the quiz or exit the game.
- The
welcome()
returns the user name and the answer to whether the user wants to begin the quiz or not. - Finally the module exports the
welcome()
method, which is invoked by theapp.js
module.
- This module has a
-
- The module stores the questions in the form of
array of object
which are exported to theapp.js
module.
- The module stores the questions in the form of
-
- This module has
quiz()
method that imports the 10 questions in the form of array of object from thequestions.js
module. - These questions are displayed to the user, and then user enters the choice of answer.
- This answer is checked with the original answer and the score is updated.
- The final score is returned to the
app.js
module where the final score is displayed using various styles fromCHALK
andboxen
.
- This module has
-
- This package is used to add colors, styles and weights to plain console.log displays
-
- This package provides box like styles with padding, borders, margins, colors and backgrounds
-
- This package provides interactivity to have a conversation with the user via a console.
-
- This package provides spinners and loading objects to indicate a loading process.
-
- This package is used to clear the terminal screen or move the cursor position to the topmost left of the terminal (0,0).