what does [object Object] mean?
<p>I am trying to alert a returned value from a function and i get this in the alert</p>

<p>[object Object]  </p>

<p>here is the javascript code</p>

<pre><code>&lt;script type="text/javascript"&gt;
$(function ()
{
var $main = $('#main'),
    $1 = $('#1'),
    $2 = $('#2');

$2.hide(); // hide div#2 when the page is loaded

$main.click(function ()
{
    $1.toggle();
    $2.toggle();
});

 $('#senddvd').click(function ()
{
   alert('hello');
   var a=whichIsVisible();
   alert(whichIsVisible());
});


function whichIsVisible()
{
    if (!$1.is(':hidden')) return $1;
    if (!$2.is(':hidden')) return $2;
}

 });

 &lt;/script&gt;
</code></pre>

<p>whichIsVisible is the function which i am trying to check on</p>
