Conditional structures: Difference between revisions

Content added Content deleted
(→‎{{header|Kotlin}}: Updated example see https://github.com/dkandalov/rosettacode-kotlin for details)
(→‎{{header|jq}}: mention //)
Line 2,388: Line 2,388:
else error("unexpected value: \(.)")
else error("unexpected value: \(.)")
end</lang>
end</lang>
Since jq's <tt>and</tt> and <tt>or</tt> are short-circuiting, they can also be used for branching.
Since jq's <tt>and</tt> and <tt>or</tt> are short-circuiting, they can also be used for branching, as can the binary disjunctive operator `//`.


=={{header|Kotlin}}==
=={{header|Kotlin}}==