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
The results are in! See what nearly 90,000 developers picked as their most loved, dreaded, and desired coding languages and more in the 2019 Developer Survey.
312
reputation
2
8

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

2
answers
0
questions
~37k
people reached
  • Member for 4 years, 5 months
  • 30 profile views
  • Last seen 2 days ago

Top Tags (5)

Score 16
Posts 1
Score 16
Posts 1
Score 3
Posts 1
Score 3
Posts 1
Score 3
Posts 1

Top Posts (2) All Questions Answers | Votes Newest

Badges (10)

Gold

Silver

2

Rarest

Bronze

8

Rarest