首页 > 解决方案 > javascript中的问号后跟句号是什么意思?

问题描述

我不知道是什么?.意思。例子:

 React.useEffect(() => {
    if (route.params?.post) {
      // Post updated, do something with `route.params.post`
      // For example, send the post to the server
    }
  }, [route.params?.post]);

很难用谷歌搜索答案。我只看到有关条件(三元)运算符的文章。

标签: javascript

解决方案


推荐阅读