anybody can help me with the following Js syntax? I don't understand the line starting with "( $.inArray( wzdId, this...." I mean why does that line start with just a parentesis? What does it mean?
This is the complete code:
_activateStep: function( wzdId ) {
if ( condition ) {
var stepIndex = this._findNav( wzdId ).index();
for( var i = 0; i < stepIndex; ++i) {
if( condition ) === -1 ) {
return;
}
}
( $.inArray( wzdId, this._activatedSteps ) === -1 ) && this._activatedSteps.push( wzdId );
}
}
Thank you
(...)) in this case are the grouping operator. You can use it to change the order of precedence or just make expressions more readable. For example:6 * (4 + 3)or(5 * 2) + (4 * 8).