Skip to main content
VLAZ's user avatar
VLAZ's user avatar
VLAZ's user avatar
VLAZ
  • Member for 6 years, 10 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
41
silver badges
103
bronze badges
1,113
Score
69
Posts
51
Posts %
480
Score
27
Posts
20
Posts %
270
Score
15
Posts
11
Posts %
241
Score
16
Posts
12
Posts %
95
Score
24
Posts
18
Posts %
88
Score
40
Posts
29
Posts %