function internAdd() {
    inquirer.prompt([
        {
            type: "input",
            name: "internsName",
            message: "Enter your intern's name:"
        },
        {
            type: "input",
            name: "internsID",
            message: "Enter your intern's ID:"
        },
        {
            type: "input",
            name: "internsEmail",
            message: "Enter your intern's email:"
        },
        {
            type: "input",
            name: "internsSchool",
            message: "Enter your intern's school:"
        }
        // creates an 'intern' class using the answers from Inquirer. Pushes the class into an array of employees.
    ]).then(function(data) {
        const internClass = new Intern(data.internsName, data.internsID, data.internsEmail, "Intern", data.internsSchool)
        teamMembers.push(internClass)
        console.log(internClass)
        newTeamMember()
    })
}
// The above function of creating an intern profile, with questions whose answer will fit into its class constructor
The above function of creating an intern profile, with questions whose answer will fit into its class constructor
The above function of creating an intern profile with questions whose answer will fit into its class constructor
function internAdd() {
    inquirer.prompt([
        {
            type: "input",
            name: "internsName",
            message: "Enter your intern's name:"
        },
        {
            type: "input",
            name: "internsID",
            message: "Enter your intern's ID:"
        },
        {
            type: "input",
            name: "internsEmail",
            message: "Enter your intern's email:"
        },
        {
            type: "input",
            name: "internsSchool",
            message: "Enter your intern's school:"
        }
    ]).then(function(data) {
        const internClass = new Intern(data.internsName, data.internsID, data.internsEmail, "Intern", data.internsSchool)
        teamMembers.push(internClass)
        console.log(internClass)
        newTeamMember()
    })
}
function internAdd ( ) { inquirer . prompt ( [ { type : "input" , name : "internsName" , message : "Enter your intern's name:" } , { type : "input" , name : "internsID" , message : "Enter your intern's ID:" } , { type : "input" , name : "internsEmail" , message : "Enter your intern's email:" } , { type : "input" , name : "internsSchool" , message : "Enter your intern's school:" } ] ) . then ( function ( data ) { const internClass = new Intern ( data . internsName , data . internsID , data . internsEmail , "Intern" , data . internsSchool ) teamMembers . push ( internClass ) console . log ( internClass ) newTeamMember ( ) } ) }
The above function of creating an intern profile, with questions whose answer will fit into its class constructor
The above function of creating an intern profile with questions whose answer will fit into its class constructor
// creates an 'intern' class using the answers from Inquirer. Pushes the class into an array of employees.