Why 'else + condition' does not work but is not returning an error

Oh, I see. The reason is because what you wrote is

a = true
b = false

if a
   @info "1"
else 
    b
   @info "2"
end

The new line after else is optional.

1 Like