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 = ["test@domain1.com", "test@tomato2.com"];
const myFunc = () => {
return search.some((r) => domainAlertList.includes(r));
};
console.log(myFunc());
It returns false instead of true