diff --git a/code/examples/ternary-operator.md b/code/examples/ternary-operator.md index 38187e9..ed009a9 100644 --- a/code/examples/ternary-operator.md +++ b/code/examples/ternary-operator.md @@ -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"; ``` ## 👃 코드 냄새 맡아보기 diff --git a/en/code/examples/ternary-operator.md b/en/code/examples/ternary-operator.md index 5b8609d..0c5f86b 100644 --- a/en/code/examples/ternary-operator.md +++ b/en/code/examples/ternary-operator.md @@ -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 ? "BOTH" : ACondition ? "A" : "NONE"; ``` ## 👃 Smell the Code