Looking for a simpler way to check if multiple properties & methods in an object are undefined
<p>Consider the following code:</p>

<pre><code>    if(eform[funcName] !== undefined){
        if(eform[funcName].init !== undefined){
            //finally do something
        }
    }
</code></pre>

<p>I'm first checking to see if the <code>eform</code> object has the property specified by the variable <code>funcName</code>. If it does, then I need to check whether that property has an <code>init</code> method.</p>

<p>Is there any way to combine these into a single <code>if</code> statement? Or perhaps something even more elegant than that?</p>
