Is it possible to write such a line, and within this line I want change a variable value?
opacity: condition == true ? 1, stringName ='Steve' : 0
Not sure what you expect the code to do exactly but my guess
opacity: condition == true ? (){ stringName = 'Steve'; return 0; }() : 0;
You can't have a list of expressions in the true or false part, only one single expression.
I think this is what you wanted
opacity : condition== true ? 1 : stringName == "Steve" ? 0 : 2,
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With