It's just a conditional operator expression where the expression in the third operand is another conditional operator expression:
var temp;
if (ticket['areaName']) { // First conditional's first operand (test)
temp = ticket['areaName']; // First conditional's second operand (true case expression)
}
// All of the following is the first conditional's third operand (the false case expression)
else if (!area && ticket['catName']) { // Second conditional's first operand (test)
temp = ticket['catName']; // Second conditional's second operand (true case expression)
}
else {
temp = '--'; // Second conditional's third operand (false case expression)
}
/*...*/.replace('{{name}}', temp);
(And yeah, I probably would have broken it up, at least with parens and newlines. No need to make life hard on people trying to read one's code.)