Questions about function signature
<p>I found a javascript example online that made me a bit confused. I’m quite new to javascript but have good knowledge in “traditional” languages. I was not able to find an answer when I tried google for it so I’ll ask the question here and hope someone can help me.</p>

<p>From one "class" the following code was executed:</p>

<pre><code>this.foo.addListener("xType", this, this.boo);
</code></pre>

<p>The function that were called looked like this:</p>

<pre><code>//first argument (type:String) what kind of event
//second argument (type:Function) listener - listening function
addListener: function(kindOf, listener) {
</code></pre>

<p>What I don't understand is that the number of arguments does not match. When the function is called 3 arguments are used namely "xType", this and this.boo but in the function signature there is only 2 arguments namely kindOf and listener. Is this some javascript functionality that you can call functions with some other amount of arguments than what is declared in the function? Or how is this code supposed to work?</p>
