For language supporting optional else, if we have code like the following:
if (first) if (second) whenTrue(); else whenFalse();Where does else belong to?
Most languages choose the else to belong to the closest if.
For language supporting optional else, if we have code like the following:
if (first) if (second) whenTrue(); else whenFalse();Where does else belong to?
Most languages choose the else to belong to the closest if.