(a==b)&&(return a)
Lazy people want to use short-circuit operation, but the result is an error, syntax error, unexpected token return
漂亮男人2017-05-18 10:50:39
JavaScript logical AND operation, if the previous expression is true, then the value of the second expression is returned.
However, the return value of the expression return a is an "Illegal return statement", that is to say, it neither returns undefined, nor null or empty value, but should not return anything at all. Therefore, an error will be reported.