Is a conditional operator.
Of Developers.mozilla.org:
Conditional operator
The conditional operator is the only Javascript operator that uses three
operands. The operator can have one of two values based on a
condition. The syntax is:
condicao ? valor1 : valor2
If condition is true, the operator will have the value of value1. Case
otherwise it will have the value of value2. You can use the operator
conditional anywhere it would use a standard operator. For example:
var status = (idade >= 18) ? "adulto" : "menor";
In the case of your example, if parseInt(this.gap / 1.3) == 0
then this.gap
will be 1, otherwise it will be parseInt(this.gap / 1.3)
.
Forget what I said before, really the writing is Javascript, however the rest was right XD. See you
– Guilherme Nascimento