function startCustomer() {
  inquirer
    .prompt({
      name: "viewPurchase",
      type: "list",
      message: "Would you like to view available items or make a purchase?",
      choices: ["View", "Purchase", "Exit"]
    })
    .then(function (answer) {
      if (answer.viewPurchase === "View") {
        itemsAvailable();
      } else if (answer.viewPurchase === "Purchase") {
        promptUserPurchase();
      } else {
        connection.end();
      }
    });
}
// Start the program by offering users three options: view items, purchase an item, or exit the program.
Start the program by offering users three options: view items, purchase an item, or exit the program.
Start the program by offering users three options : view items purchase an item or exit the program .
function startCustomer() {
  inquirer
    .prompt({
      name: "viewPurchase",
      type: "list",
      message: "Would you like to view available items or make a purchase?",
      choices: ["View", "Purchase", "Exit"]
    })
    .then(function (answer) {
      if (answer.viewPurchase === "View") {
        itemsAvailable();
      } else if (answer.viewPurchase === "Purchase") {
        promptUserPurchase();
      } else {
        connection.end();
      }
    });
}
function startCustomer ( ) { inquirer . prompt ( { name : "viewPurchase" , type : "list" , message : "Would you like to view available items or make a purchase?" , choices : [ "View" , "Purchase" , "Exit" ] } ) . then ( function ( answer ) { if ( answer . viewPurchase === "View" ) { itemsAvailable ( ) ; } else if ( answer . viewPurchase === "Purchase" ) { promptUserPurchase ( ) ; } else { connection . end ( ) ; } } ) ; }
Start the program by offering users three options: view items, purchase an item, or exit the program.
Start the program by offering users three options : view items purchase an item or exit the program .