Identifying Array Object
<p>How to know whether an object is array or not?</p>

<pre><code> var x=[];

console.log(typeof x);//output:"object"
alert(x);//output:[object Object]
console.log(x.valueOf())//output:&lt;blank&gt;? what is the reason here?
console.log([].toString()); also outputs &lt;blank&gt;     
Object.prototype.toString.call(x) output:[object Array] how?
</code></pre>

<p>since console.log([].toString()); outputs :<em>blank</em>   </p>

<p><strong>1st:</strong></p>

<p>why i get blank at 2nd last statement?</p>

<p><strong>2nd:</strong></p>

<p>Is there a way to know exactly what an object is: Array or plain Object({}) without the help of their respective methods like x.join() indicates x is an Array,not in this way.</p>

<p>Actually,in jquery selection like $("p") returns  jquery object so if i use</p>

<pre><code>console.log(typeof $("p"));//output:"object
</code></pre>

<p>I just wanted to know the actual Name of the Object.Thats it.Thank u for u help</p>
