Skip to main content
VLAZ's user avatar
VLAZ's user avatar
VLAZ's user avatar
VLAZ
  • Member for 9 years, 3 months
  • 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

2
gold badges
25
silver badges
57
bronze badges
257
Score
26
Posts
33
Posts %
222
Score
8
Posts
10
Posts %
100
Score
11
Posts
14
Posts %
96
Score
5
Posts
6
Posts %
92
Score
6
Posts
8
Posts %
84
Score
8
Posts
10
Posts %