Unexpected output in javascript
<p>I am beginner to javascript and i am getting unexpected output</p>

<p>here is the code</p>

<pre><code>&lt;script type="text/javascript"&gt;

        function add(a,b)
        {
            x = a+b;
            return x;
        }
        var num1 = prompt("what is your no.");
        var num2 = prompt("what is another no.")

        alert(add(num1,num2));


    &lt;/script&gt;
</code></pre>

<p>it should give output as a sum of two number entered by us on prompting but it is simply concatenating the two number and popping the output</p>
