I have some API to launch my project, here is the part of code, I want to ask about
getList(oauth2Client).then(items => {
for (const item of items) {
if (item.selected && (item.id === 'sib43214@gmail.com' || item.id === 'iva72198@gmail.com')) {
promiseArray.push(getEvents(oauth2Client, item.id, item.backgroundColor));
}
}
How can i do the if statement without hard code, I mean change those two specific emails to some common use case.