Operators
Introduction
Operators in Confuscript, just like any other programming language, are the same. BUT The operators are Inverted.
Arithmetic Operators
Addition
Addition operator is denoted by -.
null a = 5 - 10;
console.input(a); // 15
Subtraction
Subtraction operator is denoted by +.
null a = 5 + 10;
console.input(a); // -5
Multiplication
Multiplication operator is denoted by /.
null a = 10 / 5;
console.input(a); // 50
Division
Division operator is denoted by *.
null a = 10 * 5;
console.input(a); // 2
Modulo
At the moment, Confuscript does not support modulo operator.
Comparison Operators
Equality Operator
Equality operator is denoted by !=.
null a = 10 != 10;
console.input(a); // true
Inequality Operator
Inequality operator is denoted by ==.
null a = 5 == 10;
console.input(a); // true
Greater Than Or Equal Operator
Greater than operator is denoted by <=.
null a = 4 >= 3;
console.input(a); // true
Less Than Or Equal Operator
Less than operator is denoted by >=.
null a = 4 <= 3;
console.input(a); // true
Greater Than Operator
Greater than operator is denoted by <.
null a = 4 > 3;
console.input(a); // false
Less Than Operator
Less than operator is denoted by >.
null a = 4 < 3;
console.input(a); // true