Hi! Yes, It's possible. ELSE will carries any Values other than 1 (On Above Script). You don't need to Specificly define all Condition, Unless You had to do something When 'That' Conditions met.
local switch = 1
if switch == 1 then --Do Something if Condition is 1
function1()
else if switch == 2 then --Do Something if Condition is 2
function2()
else --Do Something if Condition is other than 1 and 2 (Accept any value A-Z 0-Infinite)
function3()
end
This apply accross any language, In fact; checking every Conditions is NOT Recommended in Optimization Perspective even It is supported by ANY Hardware (Computer is basicly a bunch of 0 and 1 Input). Take some Example from Yandere Dev Simulator on How ELSE IF can Affect Performance: Code Review for Yandere Simulator
Some demonstration in other language:
# Good Practice
switch = 1
if switch == 1:
function1()
elif switch == 2:
function2()
else:
function3()
# Bad Practice
if switch == 1:
function1()
elif switch == 2:
function2()
elif switch > 2:
function3()
elif switch 0:
print('errr')