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
802
reputation
1
7
20

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

10
answers
1
question
~14k
people reached
  • Member for 4 years, 2 months
  • 35 profile views
  • Last seen 12 mins ago

Top tags (20)

Score 31
Posts 5
Posts % 45
Score 21
Posts 2
Score 18
Posts 2
Score 15
Posts 1
Score 14
Posts 2
Score 14
Posts 1

Top posts (11) All Questions Answers | Votes Newest

View all questions and answers

Badges (28)

Gold

1

Rarest

Silver

7

Rarest

Bronze

20

Rarest