Is this function getting assigned as a method or already executed?
<p>Coming from C++ and Java, I am a beginner with Javascript. This code pattern confuses me (found in a jQuery Application):</p>

<pre><code>var opts = { drop : empty};

function drop(arg){
    opts.drop(arg);
    //do something
}
</code></pre>

<p>How I would read this: 
The object <code>opts</code> is created and the attribute <code>drop</code> is declared, but initialized as empty.
Then, the function(-object) <code>drop</code> is defined. In the second line, the drop-attribute of the opts object is called as a method. But, in my understanding, <code>opts.drop</code> is empty. So it should not be callable.</p>

<p>What happens here? Am I missing some important code, or is this a pattern that makes sense?</p>

<p>EDIT: Source: <a href="https://github.com/weixiyen/jquery-filedrop/blob/master/jquery.filedrop.js" rel="nofollow">https://github.com/weixiyen/jquery-filedrop/blob/master/jquery.filedrop.js</a></p>
