How do I add a random number to a Stored variable at the results as a number, not 2 strings added together?
<p>So here is a dorky experiment I put together basically trying to generate a D&amp;D style attack roll with a modifier. I want to add the numbers, but javascript keeps adding the numbers as strings. I'm not sure how to get the basic math done..... Here is my code-</p>

<pre><code>        function battle()
    {
        var CS = document.battleForm.playerCS.value;
        var D20 =  Math.ceil(Math.round(Math.random() * 20))
        var attackRoll = CS + D20

        if (isNaN(CS))
        {
            alert ("please provide your Combat Score!")
            return
        }
        if (CS != '')
        {
            document.battleForm.enemyCS.value = attackRoll 
        }
    }
</code></pre>
