I’m reading some code and I see a comparison that’s laid out like this:
a = b = c
Seeing as how searching Javascript about equal or comparison yields remedial results, anyone care to explain what’s going on?
EDIT: These are all objects or object properties that we’re talking about here, should have specified.
DOUBLE EDIT: This is inside of an Object.defineProperties() block.
The
=operator associates right-to-left and evaluates to the value that was assigned.So this:
Means this*:
* Unless you’re dealing with properties.