Skip to content

Commit b5bf56d

Browse files
iliakanViolet-Bora-Lee
authored andcommitted
minor fixes
1 parent f9d04f6 commit b5bf56d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,9 +226,9 @@ On the other hand, it's independently called every time when `text` is missing.
226226
```
227227
228228
````smart header="Default parameters in old JavaScript code"
229-
Several years ago, JavaScript didn't support the syntax for default parameters.
229+
Several years ago, JavaScript didn't support the syntax for default parameters. So people used other ways to specify them.
230230
231-
So people used other ways to specify them. Nowadays, we can mostly come across them in old scripts.
231+
Nowadays, we can come across them in old scripts.
232232
233233
For example, an explicit check for `undefined`:
234234
@@ -249,6 +249,7 @@ function showMessage(from, text) {
249249
```js
250250
function showMessage(from, text) {
251251
// If the value of text is falsy, assign the default value
252+
// this assumes that text == "" is the same as no text at all
252253
text = text || 'no text given';
253254
...
254255
}

0 commit comments

Comments
 (0)