Conditional JavaScript for Experts – Hacker Noon

Mastery of conditional expressions for cleaner codes

They say in Conditional JavaScript for Experts – Hacker Noon. What they are suggesting is to use side-effects of  “expression”, as Javascript does not separate commands and queries.

Call me dogmatic but this behavior to look like a fundamental ingredient for disaster. In fact the same article says that’s better to use the ternary operator.

 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.