mirror of
https://github.com/airbnb/javascript.git
synced 2026-01-13 21:38:03 -05:00
Fix third example in Enclosed operators section
This commit is contained in:
@@ -1957,6 +1957,7 @@ Other Style Guides
|
||||
const bar = a ** b - 5 % d;
|
||||
|
||||
// bad
|
||||
// one may be confused into thinking (a || b) && c
|
||||
if (a || b && c) {
|
||||
return d;
|
||||
}
|
||||
@@ -1968,7 +1969,7 @@ Other Style Guides
|
||||
const bar = (a ** b) - (5 % d);
|
||||
|
||||
// good
|
||||
if ((a || b) && c) {
|
||||
if (a || (b && c)) {
|
||||
return d;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user