Stats
1,380
reputation
2k
reached
7
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
gold badge
-
FanaticNov 29, 2020
8
silver badges
-
PunditFeb 22
-
EnthusiastSep 20, 2020
-
Yearling
× 6Jan 28
12
bronze badges
-
Citizen PatrolFeb 6
-
CommentatorJul 1, 2022
-
ScholarDec 19, 2018
Top tags
View all tags
44
Score
8
Posts
80
Posts %
14
Score
1
Posts
10
Posts %
12
Score
1
Posts
10
Posts %
12
Score
1
Posts
10
Posts %
12
Score
1
Posts
10
Posts %
10
Score
2
Posts
20
Posts %
Top network posts
View all network posts