declare varable inside onclick?
<p>how can i declare a var in javascript when someone clicks something and then declare that varable, depending on what a function will return, which would be either a true or false value.</p>

<p>something like</p>

<pre><code>onclick="var varable = somefunction(); "
</code></pre>

<p>i will then be comparing that varable inside the onclick to then execute a function, so if that varable was true execute a function, otherwise if it was false, return.</p>

<p>how can both of those things be done in js?</p>
