app.js
// Collects responses and writes them to the HTML document
Collects responses and writes them to the HTML document
Collects responses and writes them to the HTML document
function init() {
    inquirer.prompt(questions).then((answers) => {
        if (answers.role === "Manager") {
            const newManager = new Manager(answers.name, answers.id, answers.email, answers.officeNumber);
            teamMembers.push(newManager);
        }
        else if (answers.role === "Engineer") {
            const newEngineer = new Engineer(answers.name, answers.id, answers.email, answers.github);
            teamMembers.push(newEngineer);
        }
        else {
            const newIntern = new Intern(answers.name, answers.id, answers.email, answers.school);
            teamMembers.push(newIntern);
        }
        if (answers.addEmployee === "Yes") {
            init();
        }
        else {
            fs.writeFileSync("team.html", render(teamMembers));
        }
    })
}
function init ( ) { inquirer . prompt ( questions ) . then ( ( answers ) => { if ( answers . role === "Manager" ) { const newManager = new Manager ( answers . name , answers . id , answers . email , answers . officeNumber ) ; teamMembers . push ( newManager ) ; } else if ( answers . role === "Engineer" ) { const newEngineer = new Engineer ( answers . name , answers . id , answers . email , answers . github ) ; teamMembers . push ( newEngineer ) ; } else { const newIntern = new Intern ( answers . name , answers . id , answers . email , answers . school ) ; teamMembers . push ( newIntern ) ; } if ( answers . addEmployee === "Yes" ) { init ( ) ; } else { fs . writeFileSync ( "team.html" , render ( teamMembers ) ) ; } } ) }
Collects responses and writes them to the HTML document
Collects responses and writes them to the HTML document