I'm trying to use set.has() in lightning web components and it seems to be not working.
Below is the code snippet..
sStatusToVerify = 'Complete';
var setStatusVals = [...new Set(this.lstAllData.map(obj => obj.sStatus))];
console.log('setStatusVals : ',setStatusVals);
console.log('Contains?? : ' ,setStatusVals.has(sStatusToVerify));
setStatusVals consoles all the values and it contains "Complete". However, the next console is not printed at all. It should ideally print true. Not sure why this is not working.
What is wrong here?