function intern() {
    console.log('Please provide information for your new intern.');
    inquirer.prompt([ // Intern data input section
        {   
            type: 'input',
            message: `What is the intern's name?`,
            name: 'name'
        },
        {
            type: 'number',
            message: `What is the intern's ID number?`,
            name: 'id'
        },
        {
            type: 'input',
            message: `What is the intern's e-mail?`,
            name: 'email'
        },
        {
            type: 'input',
            message: `What school does the intern attend?`,
            name: 'school'
        }
    ]).then((data) => { // New Intern creation
        let employee = new Intern(data.name, data.id, data.email, data.school);
        employee.role = employee.getRole();
        // Add new Intern to the staff array
        staff.push(employee);
    }).then(() => query()); // Chain more options from query()
}
// Inquirer function for gathering new Intern data
Inquirer function for gathering new Intern data
Inquirer function for gathering new Intern data
function intern() {
    console.log('Please provide information for your new intern.');
    inquirer.prompt([ 
        {   
            type: 'input',
            message: `What is the intern's name?`,
            name: 'name'
        },
        {
            type: 'number',
            message: `What is the intern's ID number?`,
            name: 'id'
        },
        {
            type: 'input',
            message: `What is the intern's e-mail?`,
            name: 'email'
        },
        {
            type: 'input',
            message: `What school does the intern attend?`,
            name: 'school'
        }
    ]).then((data) => { 
        let employee = new Intern(data.name, data.id, data.email, data.school);
        employee.role = employee.getRole();
        staff.push(employee);
    }).then(() => query()); 
}
function intern ( ) { console . log ( 'Please provide information for your new intern.' ) ; inquirer . prompt ( [ { type : 'input' , message : ` ` , name : 'name' } , { type : 'number' , message : ` ` , name : 'id' } , { type : 'input' , message : ` ` , name : 'email' } , { type : 'input' , message : ` ` , name : 'school' } ] ) . then ( ( data ) => { let employee = new Intern ( data . name , data . id , data . email , data . school ) ; employee . role = employee . getRole ( ) ; staff . push ( employee ) ; } ) . then ( ( ) => query ( ) ) ; }
Inquirer function for gathering new Intern data
Inquirer function for gathering new Intern data
// Intern data input section // New Intern creation // Add new Intern to the staff array // Chain more options from query()