Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
docs: no-constant-condition: Add multi-comparison example (#16776)
* docs: Add multi-comparison example to no-constant-condition

* Merge new example into existing code blocks
  • Loading branch information
SebastianSimon committed Jan 24, 2023
1 parent 40287db commit 2aa4f5f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/src/rules/no-constant-condition.md
Expand Up @@ -74,6 +74,10 @@ do {
} while (x = -1);

var result = 0 ? a : b;

if(input === "hello" || "bye"){
output(input);
}
```

:::
Expand Down Expand Up @@ -102,6 +106,10 @@ do {
} while (x);

var result = x !== 0 ? a : b;

if(input === "hello" || input === "bye"){
output(input);
}
```

:::
Expand Down

0 comments on commit 2aa4f5f

Please sign in to comment.