Computer Science, asked by sonimaharshivgec, 1 year ago

Consider following code.

{{data.userName}}



The data object is fetched from a service and turns out to be null. In such a case, how can you ensure that the app doesn't crash or log any errors?

A)

{{data.userName == null? data.userName: ' '}}



B) No change required. The app will work just fine without any errors

C)

{{data?.userName}}



D)

{{data.userName != null}}

Answers

Answered by KunalS91
6
Wtt is ur question i don't understand.
Similar questions