/** * * @param {string[]} names - an array of ids * @param {string[]} names - an array of ids * @param {string[]} names - a blank array to push into * * This function will compare array1 with array2 and if the items dont match then they are pushed to array3 */ const compareIds = (array1, array2, array3) => { array1.forEach((id) => { if (!array2.includes(id)) { array3.push(id); } }); };