Message from JavaScript discussions
September 2018
— Imo using an expression itself as control flow is wrong, while using the result of the expression in control flow is correct
You have to consider that the operator is taking the values as inputs, doing extra operations even after the desired side effect (assignment) happens
— It's just a nit pick I have, I am too aware of all the details from the spec so I am always trying to avoid inefficiency, but aside from that I feel it makes code less readable too
— He reuses them in big functions m8.... as in for different types depending on where in the function you are
— Agreed
— But I chose the second solution
— Instead of using if....
— Always use the result
— Expressions always have a result, right? wat are you talking about is a matter of taste then
— What about
if a = object.thing
a.lenght = 0
— That doesn't look like an expression to me
— Yes, always. Not sure what you mean by that last part