Skip to main content
VLAZ's user avatar
VLAZ's user avatar
VLAZ's user avatar
VLAZ
  • Member for 7 years, 7 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
53
silver badges
130
bronze badges
1,547
Score
100
Posts
54
Posts %
564
Score
37
Posts
20
Posts %
554
Score
39
Posts
21
Posts %
513
Score
35
Posts
19
Posts %
143
Score
31
Posts
17
Posts %
102
Score
51
Posts
28
Posts %