<script>
function getSum(a, b) {
sum = a + b;
document.write(sum);
}
var x = prompt();
var y = prompt();
getSum(x, y);
</script>
For example, I input 2 and 2. The output for that will be 22. It's as if it treats the values as if they were characters? But when I skip the whole prompt thing and replace x and y inside the getSum() with actual numbers, the code works. How do I fix this so that it will compute the number values inside variables?