As per question title, I'm using:
Array.prototype.containsAny = function (otherArray) {
for (let i = 0; i < otherArray.length; i++)
if (this.includes(otherArray[i]))
return true;
return false;
};
let a1 = [3, 5, 9];
let a2 = [4, 5];
a1.containsAny(a2);
Is there a better way?