function prompter() {
    inquirer
        .prompt([{
                name: "id",
                type: "input",
                message: "Please enter ID# of product you would like to purchase:"
            },
            {
                name: "quantity",
                type: "input",
                message: "Please enter how many units(quantity) to purchase?"
            }
        ]).then(function (answer) {
            var qty = parseFloat(answer.quantity);
            var id = parseFloat(answer.id);
            // based on their answer, checks to see if NAN or not then sends to quantity-
            if (!isNaN(qty) && !isNaN(id)) {
                checkQTY(qty, id);
            } else {
                console.log("Please enter numeric value only! Re-enter!");
                prompter();
            }
        });
}
/*The app should then prompt users with two messages. Then depending on the response from user, it checks on the quanity first then move to function */
The app should then prompt users with two messages. Then depending on the response from user, it checks on the quanity first then move to function
The app should then prompt users with two messages . Then depending on the response from user it checks on the quanity first then move to function
function prompter() {
    inquirer
        .prompt([{
                name: "id",
                type: "input",
                message: "Please enter ID# of product you would like to purchase:"
            },
            {
                name: "quantity",
                type: "input",
                message: "Please enter how many units(quantity) to purchase?"
            }
        ]).then(function (answer) {
            var qty = parseFloat(answer.quantity);
            var id = parseFloat(answer.id);
            if (!isNaN(qty) && !isNaN(id)) {
                checkQTY(qty, id);
            } else {
                console.log("Please enter numeric value only! Re-enter!");
                prompter();
            }
        });
}
function prompter ( ) { inquirer . prompt ( [ { name : "id" , type : "input" , message : "Please enter ID# of product you would like to purchase:" } , { name : "quantity" , type : "input" , message : "Please enter how many units(quantity) to purchase?" } ] ) . then ( function ( answer ) { var qty = parseFloat ( answer . quantity ) ; var id = parseFloat ( answer . id ) ; if ( ! isNaN ( qty ) && ! isNaN ( id ) ) { checkQTY ( qty , id ) ; } else { console . log ( "Please enter numeric value only! Re-enter!" ) ; prompter ( ) ; } } ) ; }
The app should then prompt users with two messages.
The app should then prompt users with two messages .
// based on their answer, checks to see if NAN or not then sends to quantity-