VLAZ
  • N/A
  • Member for 6 years, 6 months
Stats
319
reputation
191
reached
0
answers
2
questions
Loading…
About

To be, or not to be, that is the question

Translating it into code, we get

theQuestion = 2b || !2b

This returns true for any value of 2b, making the evaluation redundant. We can optimise it by removing the expression and substituting with the result.

theQuestion = true

Badges
1
gold badge
2
silver badges
6
bronze badges
Top tags
0
Score
2
Posts
100
Posts %
0
Score
2
Posts
100
Posts %
0
Score
2
Posts
100
Posts %