Closed bambams closed 6 years ago
https://github.com/ecj2/momo/blob/b74929b0ba6c208fbc587eb6edd44dcbe3b9bec2/momo.js#L283
Case of a useless ternary operator. Any time you have boolean_expr() ? true : false or boolean_expr() ? false : true you are being redundant. The boolean_expr() is already your result (or the inverse of it is).
boolean_expr() ? true : false
boolean_expr() ? false : true
You're absolutely right. Thanks for pointing this out!
https://github.com/ecj2/momo/blob/b74929b0ba6c208fbc587eb6edd44dcbe3b9bec2/momo.js#L283
Case of a useless ternary operator. Any time you have
boolean_expr() ? true : false
orboolean_expr() ? false : true
you are being redundant. The boolean_expr() is already your result (or the inverse of it is).