[JavaScript] Clean Solution
Code\n\n\n\nlet minimumTeachings = function(n, languages, friendships) {\n        let mostSpokenLanguages = new Array(n + 1).fill(0);\n        let PPL = new Map
# Code\n\n```\n\nlet minimumTeachings = function(n, languages, friendships) {\n        let mostSpokenLanguages = new Array(n + 1).fill(0);\n        let PPL = new Map();\n\n        friendships.forEach( ( element ) => \n        {\n            let LANG = new Set( languages[element[0] - 1] );\n\n            let shareLang = false;\n            for ( const l of languages[element[1] - 1] )\n            {\n                if ( LANG.has(l) )  \n                {\n                    shareLang = true;\n                    break;\n                }\n            }\n\n            if ( !shareLang )\n            {\n                PPL.set( element[0], languages[element[0] - 1] );\n                PPL.set( element[1], languages[element[1] - 1] );\n            }\n        } );\n\n        PPL.forEach( (value, key) => { for ( const l of value ) ++mostSpokenLanguages[l] } );\n\n        return PPL.size - Math.max(...mostSpokenLanguages);\n};\n```
['JavaScript']