Boolean values: Difference between revisions

(Replace println() with print(); replace output "syntaxhighlight" tag with "pre" tag)
(→‎Joy: add)
Line 1,402:
 
(source: [http://www.ecma-international.org/publications/standards/Ecma-262.htm ECMAScript Language Reference])
 
=={{header|Joy}}==
The truth literals are <code>true</code> and <code>false</code>. In a conditional context, <code>false</code>, numerical values (including characters) of zero, empty lists and empty sets are evaluated as false.
 
=={{header|jq}}==
<tt>true</tt> and <tt>false</tt> are the only entities of type "boolean":
Line 1,416 ⟶ 1,420:
jq's logical operators, however, do not require boolean inputs. In brief, <tt>false</tt> and <tt>null</tt> are both regarded as false, and all other JSON entities are regarded as <tt>true</tt>. That is, all values except for <tt>false</tt> and <tt>null</tt> are truthy.
 
=={{header|Julia}}==
Julia has a built-in <code>Bool</code> type with values <code>true</code> and <code>false</code>.
559

edits