This is simple JavaScript CLI Quiz app which has 3 games in total
- Quiz game on country and capital cities
- Birthday is a leap year
- Birthday is a prime Number
--> Click here to play the game
Features of readlineSync that are used in this app
- readlineSync.quetion - to takes simple user inputs.
- readlineSync.keyInSelect - used to create quiz where question, options and answer is storedd in an array of objects.
- readlineSync.prompt - used to take date of birth of user with prompt ">" also used limit functionality to validate the input against a regex.
Used Chalk to beautify the app. Below are the places where i used chalk
- color the answers if it was right/wrong in quiz game.
- color the error message if user entered date in wrong format.
- beautify the final scores and if the high score was beaten/matched.
- console.log
- variables
- if else conditions
- for loop
- functions