DEV Community

loading...

Discussion on: Top 20 JavaScript tips and tricks to increase your Speed and Efficiency

Collapse
vladimirc profile image
Vladimir C

Never use ternary operators to replace more than a single if...else. Otherwise, it quickly becomes unreadable and error-prone. The example from your post is an excellent proof of this :'D