diff --git a/base/docs/basedocs.jl b/base/docs/basedocs.jl index e28b3a21659a8..a142ecffdb732 100644 --- a/base/docs/basedocs.jl +++ b/base/docs/basedocs.jl @@ -937,11 +937,14 @@ expression, rather than the side effects that evaluating `b` or `c` may have. See the manual section on [control flow](@ref man-conditional-evaluation) for more details. # Examples -``` +```jldoctest julia> x = 1; y = 2; -julia> x > y ? println("x is larger") : println("y is larger") -y is larger +julia> x > y ? println("x is larger") : println("x is not larger") +x is not larger + +julia> x > y ? "x is larger" : x == y ? "x and y are equal" : "y is larger" +"y is larger" ``` """ kw"?", kw"?:"