
Hi Guys
I want to compare the given "to" email ID (e.g. test1@gmail.com) on Email form with set of two email ID's (e.g. test2@gmail.com && test3@gmail.com) . How can this be achieved using Javascript.
set 1 = "test2@gmail.com"," test3@gmail.com".
check in if condition
if(set1.has(test1@gamil.com)
{
}
else
{
}
Hello Sandy Hello
Your code should look like the below:
let to = "test1@gmail.com";
let text = "test2@gmail.com,test3@gmail.com";
const myArray = text.split(",");
for (let i = 0; i < myArray.length; i ) {
if(to === myArray[i]){
console.log("Test");
}
}
Let me know if I can provide you with more details.
Thanks
Regards,
Abdul Wahab
Power Platform/Customer Engagement Developer/Lead/Solution Architecture/Project Manager
Direct/WhatsApp: 923323281237
E-mail: abdulwahabubit@outlook.com
Skype: abdul.wahabubit
Linkedin: www.linkedin.com/.../