Hi i have an object like so,
const obj = {
id: '1',
itemData: [
"type1",
"type2",
"type3",
],
}
sometimes this itemData array can be empty array.
now i have to check if itemData has "type1" or "type2". if so then should return true if not false.
i have tried like below,
const isDisabled = obj.itemData.map(e => return e === "type1" || e==="type2")
but this doesnt work. could someone help me with this. thanks.
return--- also see<Array>.includes