utils/makehtml.js
// array = Array of employee objects forming team 
array = Array of employee objects forming team
array = Array of employee objects forming team
function makehtml(array) {
    if (array.length == 0) {
        console.log("No Team Members")
        return "No Team Members"
    }
    let teamcards = "";
    const secondhalf = fileIO.read(`${__dirname}/secondhalf.txt`)
    const firsthalf = fileIO.read(`${__dirname}/firsthalf.txt`);
    array.forEach(element => {
        switch (element.getRole()) {
            case 'Manager':
                teamcards += managercard(element)
                break;
            case 'Engineer':
                teamcards += engineercard(element)
                break;
            case 'Intern':
                teamcards += interncard(element)
                break;
            default:
                break;
        }
    });
    let htmlout = firsthalf + teamcards + secondhalf;
    fileIO.write("./output/index.html", htmlout.slice(1, -1))
    return htmlout
}
function makehtml ( array ) { if ( array . length == 0 ) { console . log ( "No Team Members" ) return "No Team Members" } let teamcards = "" ; const secondhalf = fileIO . read ( ` ${ __dirname } ` ) const firsthalf = fileIO . read ( ` ${ __dirname } ` ) ; array . forEach ( element => { switch ( element . getRole ( ) ) { case 'Manager' : teamcards += managercard ( element ) break ; case 'Engineer' : teamcards += engineercard ( element ) break ; case 'Intern' : teamcards += interncard ( element ) break ; default : break ; } } ) ; let htmlout = firsthalf + teamcards + secondhalf ; fileIO . write ( "./output/index.html" , htmlout . slice ( 1 , - 1 ) ) return htmlout }
array = Array of employee objects forming team
array = Array of employee objects forming team
//    html file is composed of firsthalf + teamcards + secondhalf // Get rid of leading and trailing backticks to make html file // return htmlout.txt file for testing purposes