How to replace if and ternary operator with logical operator


#1

image
i want above expression to work same without “if” and ternary operator.Can we solve it by logical operator?