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

3
gold badges
52
silver badges
128
bronze badges
1,512
Score
98
Posts
54
Posts %
563
Score
37
Posts
20
Posts %
550
Score
39
Posts
21
Posts %
508
Score
35
Posts
19
Posts %
143
Score
31
Posts
17
Posts %
102
Score
51
Posts
28
Posts %