Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
404
reputation
3
10

VLAZ

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

6
answers
0
questions
~4k
people reached
  • Member for 2 years, 11 months
  • 16 profile views
  • Last seen 1 hour ago

Top tags (12)

Score 16
Posts 1
Posts % 17
Score 16
Posts 1
Score 12
Posts 5
Score 7
Posts 2
Score 7
Posts 2
Score 5
Posts 1

Top posts (6) All Questions Answers | Votes Newest

Badges (13)

Gold

Silver

3

Rarest

Bronze

10

Rarest