intersect = (array1, array2) -> [array1].flat().filter( (v) -> array2.includes v).length m1Options = [ "Risk-based questionnaires" "Use of risk management tool or software" "Conducting research" ] m2Options = ["Geographic", "Industry", "Resource", "Workforce"] if intersect(m1, m1Options) && intersect(m2, m2Options) "Yes" else if m1.includes("Unknown") && m2.includes("Unknown") "Unknown" else "No"