Operator reference
Declarative expressions (
$expression
) admit a closed set of operators, enforced by the Jx schema. This page enumerates that set straight from
packages/schema/schema.json
. The expression model itself is documented in the
Framework concepts
section; named-formula composition is cataloged in the
formula catalog
.
Unary operators
Applied to a single
target
operand.
!
·
-
Binary operators
Applied to a
target
and a
value
operand. Arithmetic, comparison, logical, and nullish-coalescing forms — the blessed subset of JavaScript's operator set (spec §19.4).
+
·
-
·
*
·
/
·
%
·
===
·
!==
·
<
·
<=
·
>
·
>=
·
&&
·
||
·
??
Assignment operators
Statement-position only: assign (or read-modify-write) a state path. Not valid inside pure expressions.
=
·
+=
·
-=
·
*=
·
/=
Conditional, switch, and call
?:
selects between
value
and
else
on a
target
condition;
switch
matches a
target
against
cases
;
call
invokes a named formula (spec §19.4c) with
args
.
?:
·
switch
·
call
Pure standard-library methods
Genuine pure
String
/
Array
/
Number
prototype methods, usable inside pure expressions (spec §19.4d). The change-by-copy family (
toSorted
,
toReversed
,
toSpliced
,
with
) replaces their mutating counterparts.
includes
·
indexOf
·
lastIndexOf
·
join
·
slice
·
concat
·
at
·
flat
·
toSorted
·
toReversed
·
toSpliced
·
with
·
toUpperCase
·
toLowerCase
·
trim
·
trimStart
·
trimEnd
·
split
·
startsWith
·
endsWith
·
padStart
·
padEnd
·
replaceAll
·
repeat
·
charAt
·
normalize
·
toLocaleUpperCase
·
toLocaleLowerCase
·
toFixed
·
toPrecision
·
toLocaleString
Mutation methods
Statement-position array mutations.
pop
/
shift
take no argument;
push
/
unshift
take one;
splice
takes
start
,
deleteCount
, and
items
.
pop
·
shift
·
push
·
unshift
·
splice
Iteration methods
map
/
filter
evaluate their
value
expression per item with
$map/item
and
$map/index
in scope;
reduce
additionally exposes
$reduce/acc
and takes an
initial
value.
reduce
·
map
·
filter