【前端】‘??‘与‘||‘有什么区别,为什么不问问万能的chatgpt呢

经常写`constdata=res.data.a??\'\'`或者`constdata=res.data.a||\'default\'`,一下子感觉好像没啥差别,那为何不问问万能的chatgpt呢?_前端\"\"和\...