VLAZ
  • Member for 6 years, 7 months
  • Last seen this week
Stats
879
reputation
12k
reached
1
answer
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

2
gold badges
9
silver badges
19
bronze badges
Top tags
17
Score
2
Posts
67
Posts %
17
Score
2
Posts
67
Posts %
0
Score
1
Posts
33
Posts %
0
Score
1
Posts
33
Posts %
0
Score
1
Posts
33
Posts %
0
Score
1
Posts
33
Posts %