DEV Community

loading...

Discussion on: How to Shorten JavaScript Conditionals with Short-Circuiting

Collapse
mistermoses profile image
Dan

const username = isEmailVerified && (response || "guest");

should be

const username = (isEmailVerified && response) || "guest";