const person = { name: null, age: null, message: null, } <h3>{person?.name ?? 'default Name'}</h3> <h3>{person?.age ?? 'default age'}</h3> <h4>{person?.message ?? 'default message'}</h4>
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter