From 57d1ccf05b8a3c149efc3991d8b37cabfd343ba0 Mon Sep 17 00:00:00 2001 From: A1lo Date: Wed, 30 Oct 2024 12:22:53 +0800 Subject: [PATCH] Update index.md --- .../reference/operators/nullish_coalescing/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/files/zh-cn/web/javascript/reference/operators/nullish_coalescing/index.md b/files/zh-cn/web/javascript/reference/operators/nullish_coalescing/index.md index 2f7a31336c9807..ed41e60cdf2c85 100644 --- a/files/zh-cn/web/javascript/reference/operators/nullish_coalescing/index.md +++ b/files/zh-cn/web/javascript/reference/operators/nullish_coalescing/index.md @@ -88,7 +88,7 @@ const notFalsyText = myText || "Hello world"; console.log(notFalsyText); // Hello world const preservingFalsy = myText ?? "Hi neighborhood"; -console.log(preservingFalsy); // '' (myText 既不是 undefined 也不是 null) +console.log(preservingFalsy); // ''(myText 既不是 undefined 也不是 null) ``` ### 短路 @@ -143,4 +143,4 @@ console.log(foo.someBarProp?.toUpperCase() ?? "not available"); // "not availabl - [逻辑空赋值运算符(`??=`)](/zh-CN/docs/Web/JavaScript/Reference/Operators/Nullish_coalescing_assignment) - [可选链运算符(`?.`)](/zh-CN/docs/Web/JavaScript/Reference/Operators/Optional_chaining) - [逻辑或运算符(`||`)](/zh-CN/docs/Web/JavaScript/Reference/Operators/Logical_OR) -- [函数中的默认参数值](/zh-CN/docs/Web/JavaScript/Reference/Functions/Default_parameters) +- [默认参数](/zh-CN/docs/Web/JavaScript/Reference/Functions/Default_parameters)