Owen Murphy
Sep 16, 2023

I frankly think the “&&” is more readable if you only have one condition to render. E.g., an error message. What if there is no error? Return “null”? That doesn’t seem more readable to me.

And of course there are use cases where one would use one over the other. So it depends on the situation.

Owen Murphy
Owen Murphy

Written by Owen Murphy

Software Engineer @IBM. I believe learning should be free for all people . https://linktr.ee/owenmurphy2022

No responses yet