Thank you for stopping by! I am a full-stack developer that combines the power of entrepreneurship and programming to make the lives of programmers easier.
The problem is, it's really hard to understand and few people know about this || syntax, let alone the return value of console.log. In production this type of code wouldn't even fly past code review.
So use it sparingly and with some comments for others to understand.
This
is neat. I have to admit.
The problem is, it's really hard to understand and few people know about this
||
syntax, let alone the return value ofconsole.log
. In production this type of code wouldn't even fly past code review.So use it sparingly and with some comments for others to understand.
Agreed, this code will not pass in code review. But essentially it just to make developer debugging easier.