Skip to main content
VLAZ's user avatar
VLAZ's user avatar
VLAZ's user avatar
VLAZ
  • Member for 6 years
  • Last seen this week
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

3
gold badges
32
silver badges
75
bronze badges
741
Score
47
Posts
48
Posts %
361
Score
20
Posts
20
Posts %
266
Score
15
Posts
15
Posts %
237
Score
16
Posts
16
Posts %
50
Score
31
Posts
32
Posts %
43
Score
14
Posts
14
Posts %