DEV Community

Discussion on: 5 Programming Patterns I Like

Collapse
 
josefjelinek profile image
Josef Jelinek • Edited

There is a very unfortunate drawback of using a function for "if" or ternary... both branches are always evaluated and that often means dereferencing null or undefined...