"use strict"; module.exports = function doArraysIntersect(arrayA, arrayB) { let oneSet, otherArray; if (arrayA.length > arrayB.length) { oneSet = new Set(arrayA); otherArray = arrayB; } else { oneSet = new Set(arrayB); otherArray = arrayA; } return otherArray.some((item) => oneSet.has(item)); };