testing objects with instanceof
<pre><code>var google = {  
    makeBeer : function(arg1,arg2){     
         alert([this instanceof google, arg1, arg2]);        
    }    
}

google.makeBeer('water','soda');
</code></pre>

<p>The above does not alert when i check <code>this instanceof google</code>, but the same code works when i do this. </p>

<pre><code>var google = {  
    makeBeer : function(arg1,arg2){     
         alert([this instanceof Object, arg1, arg2]);        
    }    
}

google.makeBeer('water','soda');
</code></pre>

<p>the reference 'this' is instance of Object, why not the <code>Google Object</code>. How can i ensure that the instance is of that particular object in my case.</p>

<p><strong>Update to the same question:</strong> </p>

<pre><code>var newWay = {}
google.makeBeer.call(newWay, 'pepsi', 'coke');
</code></pre>

<p>In the above case i am passing the newWay object to my funcion makeBeer, how can i know that its newWay object here.</p>
