Skip to content

Commit 57cdc82

Browse files
committedApr 10, 2024·
docs(function): fixed typo
1 parent d5e0f47 commit 57cdc82

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎docs/function.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ function f(x = 456) {
374374
return x;
375375
}
376376

377-
f2(undefined) // 456
377+
f(undefined) // 456
378378
```
379379

380380
具有默认值的参数如果不位于参数列表的末尾,调用时不能省略,如果要触发默认值,必须显式传入`undefined`

2 commit comments

Comments
 (2)

kylesaid commented on May 28, 2024

@kylesaid

这里修复了,但未同步到教程 https://typescript.p6p.net/typescript-tutorial/function.html ,显示还是f2;

ruanyf commented on May 28, 2024

@ruanyf
ContributorAuthor

那是网友搭建的,无法随着源码更新,请参考官方网站 https://wangdoc.com/typescript/function

Please sign in to comment.