DEV Community

Discussion on: How to use .map() in javascript? React

Collapse
 
janpauldahlke profile image
jan paul

with nullguard

console.log((firstdata ?? []).map(data => data.name))