In JavaScript, what is "," in conditional

In this example:

for (var c = 0, e = a.length; c < e && !(d = b(c, a[c]), !1 === d) 

And in this other:

 if (d = b(c, a[c]), !1 === d) 

Do these conditions return the first part, the second, or both?

+6
source share
1 answer

This is a comma operator and does not apply to conditionals or contours.

+13
source

All Articles