Skip to content

Commit 0b8c32e

Browse files
iliakanViolet-Bora-Lee
authored andcommitted
closes #3111
1 parent 745b57b commit 0b8c32e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

1-js/02-first-steps/15-function-basics/article.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,12 @@ showMessage("Ann"); // Ann: no text given
207207
208208
이젠 `text`가 값을 전달받지 못해도 `undefined`대신 기본값 `"no text given"`이 할당됩니다.
209209
210+
The default value also jumps in if the parameter exists, but strictly equals `undefined`, like this:
211+
212+
```js
213+
showMessage("Ann", undefined); // Ann: no text given
214+
```
215+
210216
위 예시에선 문자열 `"no text given"`을 기본값으로 설정했습니다. 하지만 아래와 같이 복잡한 표현식도 기본값으로 설정할 수도 있습니다.
211217
212218
```js run

0 commit comments

Comments
 (0)