I'd like to do this:
我想这样做:
if(a.b.c) alert('c exists') //produces error
if(a && a.b && a.b.c ) alert('c exists') //also produces ReferenceError
if(a.b.c) alertI'd like to do this:
我想这样做:
if(a.b.c) alert('c exists') //produces error
if(a && a.b && a.b.c ) alert('c exists') //also produces ReferenceError
if(a.b.c) alert