12 Good JavaScript Shorthand Techniques
Yuri Ramos
1.3K60

Another good one when an “if” statement trigger a function

Longhand:

if(c){

x();

}

ShortHand:

c && x();

Also very good post very helpful thanks :D