When working with scripts within Infoplus you may encounter an instance when you need to use an operator. This article will list the most commonly used JavaScript operators available to Infoplus. 


xDue to the ever-changing nature of writing and maintaining scripts, Infoplus does not provide support in this area. We recommend someone in your IT Department handles scripting requests internally so that you keep all control over the process.



Logical Operators


OperatorDescriptionExample
&&and(x < 10 && y > 1) is true
||or(x === 5 || y === 5) is false
!not!(x === y) is true


Arithmetic Operators


OperatorDescriptionExampleResult in yResult in x
+Additionx = y + 2y = 5x = 7
-Subtractionx = y - 2y = 5x = 3
*Multiplicationx = y * 2y = 5x = 10
/Divisionx = y / 2y = 5x = 2.5
%Modulus (division remainder)x = y % 2y = 5x = 1
++Incrementx = ++yy = 6x = 6
x = y++y = 6x = 5
--Decrementx = --yy = 4x = 4
x = y--y = 4x = 5


Assignment Operators


OperatorExampleSame AsResult in x
=x = yx = yx = 5
+=x += yx = x + yx = 15
-=x -= yx = x - yx = 5
*=x *= yx = x * yx = 50
/=x /= yx = x / yx = 2
%=x %= yx = x % yx = 0


String Operators


OperatorExampletext1text2text3
+text3 = text1 + text2"Good ""Morning" "Good Morning"
+=text1 += text2"Good Morning""Morning"""


Comparison Operators


OperatorDescriptionComparingReturns
==equal tox == 8false
x == 5true
===equal value and equal typex === "5"false
x === 5true
!=not equalx != 8true
!==not equal value or not equal typex !== "5"true
x !== 5false
>greater thanx > 8false
<less thanx < 8true
>=greater than or equal tox >= 8false
<=less than or equal tox <= 8true