-
Changing variable value based on multiple conditions
I’m trying to change the value of a variable based on four different conditions so that in each condition the value of the variable will be different. I’m trying the code below, but running into some errors. Is there a better way to tackle this?
if (myProp && !altKey)
{var myControl = myEffect + " " + myGroup + " " + "-" " " myLayerName}
else if (!myProp && altKey)
{var myControl = myEffect}
else if(!myProp && !altKey)
{var myControl = myEffect + " " + "-" " " myLayerName}
else if (myProp && altKey)
{var myControl = myEffect + " " + myGroup};