Skip to content

Commit 255b0f3

Browse files
author
Ilici
committed
Fix third example in Enclosed operators section
1 parent 4817a6b commit 255b0f3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1957,6 +1957,7 @@ Other Style Guides
19571957
const bar = a ** b - 5 % d;
19581958
19591959
// bad
1960+
// one may be confused into thinking (a || b) && c
19601961
if (a || b && c) {
19611962
return d;
19621963
}
@@ -1968,7 +1969,7 @@ Other Style Guides
19681969
const bar = (a ** b) - (5 % d);
19691970
19701971
// good
1971-
if ((a || b) && c) {
1972+
if (a || (b && c)) {
19721973
return d;
19731974
}
19741975

0 commit comments

Comments
 (0)