Skip to main content

Operators

Fluency Programming Language follows the JavaScript / ECMAScript (ES6) syntax closely.

Arithmetic

The following tables shows the list of supported arithmetic operators:

NameValueDescription
Addition+
Subtraction-
Multiplication*
Division/Floating-point division
Modulo%Modulus from division

Relational

The following tables shows the list of supported relational operators:

NameValueDescription
Equality==
Inequality!=
Less-than<
Greater-than>
Less-than or equal<=
Greater-than or equal>=

Logical

The following tables shows the list of supported logical operators:

NameValueDescription
AND&&
OR||
NOT!

Bitwise

The following tables shows the list of supported bitwise operators:

NameValueDescription
AND&
OR|
XOR^
Right Shift>>
Left Shift<<

Ternary

The ternary conditional operator is supported:

condition ? trueValue : falseValue

Optional chaining (?.)

The optional chaining (?.) operator accesses an object’s property or calls a function.

If the object’s property or function is undefined or null, the expression evaluates to 'undefined', instead of throwing an error.