How to use two math operators in the same if statement?

Tried searching around, but I couldn’t find any solutions.

Basically I’m trying to figure out if the following is possible:

if variableA >=1 and <= 4 then

In studio itself it underlines the “<=4” in red. Is there any way to use two math operators in the same if statement?

if variableA >= 1 and variableA <= 4 then
print'the condition evaluates to true'
end
1 Like

Thanks, that completely flew over my head!

1 Like