Skip to content

tripathi-g/neoG-levelZero-MarkTwo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

neoG - levelZero - MarkTwo

JavaScript CLI app

This is simple JavaScript CLI Quiz app which has 3 games in total

  1. Quiz game on country and capital cities
  2. Birthday is a leap year
  3. Birthday is a prime Number

--> Click here to play the game

List of npm packages used

1. readlineSync

Features of readlineSync that are used in this app

  1. readlineSync.quetion - to takes simple user inputs.
  2. readlineSync.keyInSelect - used to create quiz where question, options and answer is storedd in an array of objects.
  3. readlineSync.prompt - used to take date of birth of user with prompt ">" also used limit functionality to validate the input against a regex.

2. Chalk

Used Chalk to beautify the app. Below are the places where i used chalk

  1. color the answers if it was right/wrong in quiz game.
  2. color the error message if user entered date in wrong format.
  3. beautify the final scores and if the high score was beaten/matched.

JavaScripts concepts covered

  1. console.log
  2. variables
  3. if else conditions
  4. for loop
  5. functions

About

JavaScript CLI Quiz app on contries and their capital

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published