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

1
gold badge
4
silver badges
12
bronze badges
0
Score
13
Posts
100
Posts %
0
Score
5
Posts
38
Posts %
0
Score
3
Posts
23
Posts %
0
Score
1
Posts
8
Posts %
0
Score
1
Posts
8
Posts %
0
Score
1
Posts
8
Posts %