const tree = { A:{ a:()=>{return 10} } }; function test0(){ return tree.A?.a() || 1; } function test1(){ return tree.A && tree.A.a() || 1; }
test0()
test1()