使用可选链操作符(Optional Chaining Operator)可以简化对可能为null或undefined的属性或方法进行访问的代码,使用例子如`obj?.prop?.method()`
评论