How should I properly address the following:
const things = [
{
toy: 'lego',
},
{
ball: 'football',
},
{
series: 'spongebob',
},
]
const newThings = things.map((item) => {
if (item.toy) {
return item.toy.toUpperCase();
}
}).filter((n) => n);
// eslint error for consistent-return & array-callback-return
How should I properly address the following:
// eslint error for consistent-return & array-callback-return