VLAZ
  • N/A
  • Member for 6 years, 6 months
Stats
6,625
reputation
1k
reached
5
answers
4
questions
Loading…
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
7
silver badges
9
bronze badges
14
Score
8
Posts
89
Posts %
4
Score
1
Posts
11
Posts %
4
Score
1
Posts
11
Posts %
4
Score
1
Posts
11
Posts %
3
Score
1
Posts
11
Posts %
3
Score
1
Posts
11
Posts %