Kyle K
1 min readNov 16, 2019

--

Hello, thanks for pointing out those feature candidates.

In the following code:

const name = (obj.name && obj.name !== ‘’) || ‘Jane’;

if obj.name === null we get true

I think you meant:

const name = (obj.name && obj.name !== ‘’) ? obj.name : ‘Jane’;

--

--

Responses (1)