Unexplained error in JS
<p>This is the code:</p>

<pre><code>var k ;
function getrandom()
{
    k = Math.random()*2 ;
    alert(k);
}
</code></pre>

<p>Hello I've searched a lot to see why this simple JS code is not working. I appreciate your help.
Thank You.</p>
