Stats
7,821
reputation
2k
reached
12
answers
5
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
Badges
View all badges
1
gold badge
-
FanaticNov 29, 2020
10
silver badges
-
PunditFeb 9
-
EnthusiastJan 6, 2020
-
Yearling
× 8Apr 4
12
bronze badges
-
OrganizerFeb 25, 2022
-
CuriousAug 9
-
CommentatorFeb 10, 2019
Top tags
View all tags
61
Score
13
Posts
76
Posts %
27
Score
2
Posts
12
Posts %
23
Score
2
Posts
12
Posts %
23
Score
1
Posts
6
Posts %
11
Score
4
Posts
24
Posts %
8
Score
2
Posts
12
Posts %
Top network posts
View all network posts