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 === '[email protected]' || item.id === '[email protected]')) {
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.