Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions code/examples/ternary-operator.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const status = A조건 && B조건 ? "BOTH" : 둘다아닌경우 ? "NONE" : A조
다음과 같이 조건을 `if` 문으로 풀어서 사용하면 보다 명확하고 간단하게 조건을 드러낼 수 있어요.

```typescript
const status = useMemo(() => {
const status = (() => {
if (A조건 && B조건) {
return "BOTH";
}
Expand All @@ -35,5 +35,5 @@ const status = useMemo(() => {
}

return "NONE";
}, [A조건, B조건]);
}, [A조건, B조건])();
```
4 changes: 2 additions & 2 deletions en/code/examples/ternary-operator.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ This code uses multiple nested ternary operators, making it difficult to quickly
You can rewrite the conditions using `if` statements, as shown below, to make the logic clearer and easier to follow.

```typescript
const status = useMemo(() => {
const status = (() => {
if (ACondition && BCondition) {
return "BOTH";
}
Expand All @@ -35,5 +35,5 @@ const status = useMemo(() => {
}

return "NONE";
}, [ACondition, BCondition]);
}, [ACondition, BCondition])();
```