Change Truthy/Falsey value of Javascript Object
<p>Basically can I do the following...</p>

<pre><code>var obj = {}:
obj.falsey = true;
if(obj){
   //code not executed
}else{
   //code executed
}
</code></pre>

<p>I could take advantage of the fact <code>!</code>,<code>+</code>,<code>~</code>...
Call <code>valueOf/toString</code> and do the following, but I would like to avoid that.</p>

<pre><code>var obj = {valueOf:function(){return 0}}:
obj.falsey = true;
if(!!obj){
   //code not executed
}else{
   //code executed
}
</code></pre>

<p>Why would I want to do this?  Because I'm curious :D</p>
