We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6ad2407 commit 92fcb54Copy full SHA for 92fcb54
docs/object.md
@@ -885,7 +885,7 @@ const showSplashScreen = response.settings.showSplashScreen ?? true;
885
const animationDuration = response.settings?.animationDuration ?? 300;
886
```
887
888
-上面代码中,`response.settings`如果是`null`或`undefined`,就会返回默认值300。
+上面代码中,如果`response.settings`是`null`或`undefined`,或者`response.settings.animationDuration`是`null`或`undefined`,就会返回默认值300。也就是说,这一行代码包括了两级属性的判断。
889
890
这个运算符很适合判断函数参数是否赋值。
891
0 commit comments