This is not a sign of an if , it is a , operator.
You can separate expressions with a comma, and each expression will be evaluated, but only the last is used as a value for all expressions.
In your example, this is pretty useless, but sometimes you need the expression to evaluate its side effects. Example:
var i = 1; if (i += 2, i == 3) console.log("this will get logged");
Guffa
source share