VLAZ's user avatar
VLAZ's user avatar
VLAZ's user avatar
VLAZ
  • Member for 11 months
  • Last seen more than a week ago
Stats
292
reputation
740
reached
3
answers
0
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
This user doesn’t have any gold badges yet.
2
silver badges
7
bronze badges
Top tags
8
Score
1
Posts
33
Posts %
6
Score
1
Posts
33
Posts %
5
Score
1
Posts
33
Posts %
5
Score
1
Posts
33
Posts %
Top posts