Encountering an error message while utilizing the code snippet
countryMap.get(tradeId)?.map((companies) => {
: The error states 'Expected an assignment or function call and instead saw an expression @typescript-eslint/no-unused-expressions'
const calculate = (countryId: string) => {
let rev = 0;
countryMap.get(countryId)?.map((companies) => {
rev += Number(companies.profitAndLoss);
rev = Number(rev.toFixed(2));
})
return rev;
}
Looking for assistance to comprehend the source of this issue and ways to resolve it. Any insights are greatly appreciated!