Stats
2,470
reputation
2k
reached
8
answers
3
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
-
FanaticNov 29, 2020
11
-
PunditFeb 22, 2023
-
EnthusiastSep 20, 2020
-
Yearling
× 9Apr 8
12
-
Citizen PatrolFeb 6, 2023
-
CommentatorJul 1, 2022
-
ScholarDec 19, 2018
Top tags
View all tags
46
Score
9
Posts
82
Posts %
15
Score
1
Posts
9
Posts %
13
Score
2
Posts
18
Posts %
13
Score
2
Posts
18
Posts %
12
Score
1
Posts
9
Posts %
12
Score
1
Posts
9
Posts %
Top network posts
View all network posts