Stats
3,559
reputation
3k
reached
11
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
13
silver badges
-
PunditFeb 22, 2023
-
EnthusiastSep 20, 2020
-
EnlightenedAug 26
15
bronze badges
-
Citizen PatrolFeb 6, 2023
-
CommentatorJul 1, 2022
-
ScholarDec 19, 2018
Top tags
View all tags
63
Score
10
Posts
71
Posts %
32
Score
3
Posts
21
Posts %
29
Score
2
Posts
14
Posts %
29
Score
2
Posts
14
Posts %
16
Score
2
Posts
14
Posts %
13
Score
2
Posts
14
Posts %
Top network posts
View all network posts