I use a ternary expression like this all the time, but I don't like the null in it. Is there a terser way to do this?
var_1 === 'yes' ? var_2=true : null;
This is a simplified version of what it is I am doing. I just want to check if something is true/false then do something otherwise do nothing(so I put null in). Is there a better way to do this?