Can I use an object in function's parameter in javascript?
<p>I need to use:</p>

<pre><code>var obj=document.getElementsByClassName[n];
setInterval("somefunc("+obj+");",10);
</code></pre>

<p>When I'm trying to run this code, I get "Uncaught SyntaxError: Unexpected identifier". I know about this problem with <code>setTimeout("alert("+str+");)</code>, when I should use <code>.toString()</code>, but what if I need to pass an object in function?</p>

<p>Thank you.</p>
