我的第三方应用程序的主页可能有一个全局对象window.PageObject。如果它是存在的,我的应用程序需要使用它的属性和功能,如果是存在的话。_getSomeProperty() : null;
// calling a function safely requires an additional check to see
我想使用CoffeeScript存在运算符来检查一些未定义的对象属性。然而,我遇到了一个小问题。console.log test if test?== null) console.log(test);console.log test.test if test.test?= null) console.log(test.test);
这看起来根本不像是对未定义的检查。我可