bamazonCustomer.js
// finding out how many the customer wants
finding out how many the customer wants
finding out how many the customer wants
function promptCustomerForQuantity(product) {
    inquirer.prompt([{
        type: "input",
        name: "quantity",
        message: "How many would you like? [Quit with Q]",
    }]).then(function(val) {
        let quantity = parseInt(val.quantity);
        if (quantity > product.stock_quantity) {
            console.log('not enough');
            loadProducts();
        } else {
            makePurchase(product, quantity);
        }
    })
}
function promptCustomerForQuantity ( product ) { inquirer . prompt ( [ { type : "input" , name : "quantity" , message : "How many would you like? [Quit with Q]" , } ] ) . then ( function ( val ) { let quantity = parseInt ( val . quantity ) ; if ( quantity > product . stock_quantity ) { console . log ( 'not enough' ) ; loadProducts ( ) ; } else { makePurchase ( product , quantity ) ; } } ) }
finding out how many the customer wants
finding out how many the customer wants
// prompt for quanty