Skip to content

Instantly share code, notes, and snippets.

View thereisnoneed0's full-sized avatar

thereisnoneed0

View GitHub Profile
const ar =['holyjs', 'highload']
function getIntersec(params) {
const A = new Set(params[0])
const B = new Set(params[1])
return A.intersection(B)
}
console.log(getIntersec(ar)) // {'h', 'o', 'l'}