Remove redundant ternary operator

Solution Link
Line affected: const expression = Math.random() >= 0.5 ? true : false

The comparison operator already returns a boolean.
MDN Web Docs - Comparison Operators

If you are saying that you would like us to remove the unneeded ternary from that part of the linked solution, then I have made the change.

1 Like

Yes, that’s what I meant.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.