After receiving a variable from a network call of type optional String
,
const receivedData = data.receivedData
Is there a shortcut method to construct a String
using this variable and provide a default value when it's null
?
const finalString = "Received data from " + receivedData