I found this Javacript code and I am unable to understand what it means to have a ternary operator inside an if condition.
var s = 10, r = 0, c = 1, h = 1, o = 1;
if (s > r ? (c = 5, h = 2) : h = 1, o >= h)
{
alert(1);
}
Is the o >= h
the result being returned to evaluate in the "if" condition?
And what about the use of comma in "if" condition?