parseInt() or parseFloat() are functions in JavaScript which can help you convert the values into integers or floats respectively.
parseInt(string, radix);
parseFloat(string);
var x = prompt("Enter a Value", "0");
var y = prompt("Enter a Value", "0");
var num1 = parseInt(x);
var num2 = parseInt(y);
After this you can perform which ever calculations you want on them.