Skip to content

Commit

Permalink
fix: tenary logic
Browse files Browse the repository at this point in the history
  • Loading branch information
tolluset committed Jan 15, 2025
1 parent abb3cba commit ddb91be
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion code/examples/ternary-operator.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
다음 코드는 `A조건``B조건`에 따라서 `'BOTH'`, `'A'`, 또는 `'NONE'` 중 하나를 `status`에 지정하는 코드예요.

```typescript
const status = A조건 && B조건 ? "BOTH" : 둘다아닌경우 ? "NONE" : A조건 ? "A" : undefined;
const status = A조건 && B조건 ? "BOTH" : A조건 ? "A" : "NONE";
```

## 👃 코드 냄새 맡아보기
Expand Down
2 changes: 1 addition & 1 deletion en/code/examples/ternary-operator.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Using complex ternary operators can obscure the structure of the conditions, mak
The following code assigns `'BOTH'`, `'A'`, or `'NONE'` to `status` based on `ACondition` and `BCondition`.

```typescript
const status = ACondition && BCondition ? "BOTH" : NotBoth ? "NONE" : ACondition ? "A" : undefined;
const status = ACondition && BCondition ? ACondition ? "A" : "NONE";
```
## 👃 Smell the Code
Expand Down

0 comments on commit ddb91be

Please sign in to comment.