[Javascript] Object Not Defined

Mike Dougherty mdougherty at pbp.com
Sat Nov 12 20:40:26 CST 2011


On Sat, Nov 12, 2011 at 9:25 PM, Terry Riegel
<riegel at clearimageonline.com> wrote:
> Perhaps the expected object is pulled from an external source outside of
> the control of my application. There are many times I would like to simply
> call...
>
> a.b.c.title || 'untitled'

'sounds like the kind of thing you take the time to write a wrapper to
handle, then never think about again.

try{ var thetitle = a.b.c.title; } catch(err){ var thetitle = 'untitled'; }
... is probably about as good as it'll get.


More information about the Javascript mailing list