Why does arguments in Javascript return [object Arguments] when using console.log?
<p>I have the following function</p>

<pre><code>//simple function with parameters and variable
        function thirdfunction(a,b,c,d){
            console.log("the value of a is: " + a);
            console.log("the value of b is: " + b);
            console.log("the value of c is: " + c);
            console.log("the value of d is: " + d);
            console.log("the arguments for each values are: " + arguments);
            console.log("the number of arguments passed are: " + arguments.length);
        }

        console.log("no parameter values are passed");
        thirdfunction();

        console.log("only a and b parameter values are passed");
        thirdfunction(1,2);
</code></pre>

<p>However when the values passed in <code>arguments</code> are not displayed if I concatenate the text <code>the arguments for each values are:</code>. Why is that?</p>

<p>The output I have from Google's console is as follows when concatenating;</p>

<pre><code>no parameter values are passed
the value of a is: undefined
the value of b is: undefined
the value of c is: undefined
the value of d is: undefined
the arguments for each values are: [object Arguments]
the number of arguments passed are: 0
only a and b parameter values are passed
the value of a is: 1
the value of b is: 2
the value of c is: undefined
the value of d is: undefined
the arguments for each values are: [object Arguments]
the number of arguments passed are: 2 
</code></pre>

<p>The following values are passed when I don't concatenate.</p>

<pre><code>no parameter values are passed
the value of a is: undefined
the value of b is: undefined
the value of c is: undefined
the value of d is: undefined
[]
the number of arguments passed are: 0
only a and b parameter values are passed
the value of a is: 1
the value of b is: 2
the value of c is: undefined
the value of d is: undefined
[1, 2]
the number of arguments passed are: 2 
</code></pre>

<p><strong>EDIT</strong></p>

<p>Not sure why the question got down voted but the problem I have is that when I use the statement <code>console.log("the arguments for each values are: " + arguments);</code> the output in the console is <code>console.log("the arguments for each values are: " + arguments);</code> however if I pass the statement <code>console.log(arguments);</code> the output in the console is <code>[]</code> or <code>[1, 2]</code>?</p>
