javascript setTimeout function does not work
<p>I am trying to update a variable every one second. For that reason I am using setTimeout. But it does not update the variable. It logs out 0 just once. Here is my code</p>

<pre><code>var yes=0;
setTimeout(function () {
    console.log(yes);
    yes++;
}, 1000);​
</code></pre>
