I am trying to find if second array has any string from the first one. Not sure what I am doing wrong
const domainAlertList = ["@domain1", "@tomato2", "@carrot3"];
const search = ["[email protected]", "[email protected]"];
const myFunc = () => {
return search.some((r) => domainAlertList.includes(r));
};
console.log(myFunc());
It returns false instead of true