I wanna allow user to enter 2 values then i add them up togther

<script type="text/javascript">
var x = prompt("Please enter a value for x","")
var y = prompt("Please enter a value for y"," ")
if (x != null && x != "" && y != null && y != "")
{
var result
eval ("result = x" + "y")
document.write("Your result is " + result)
}
</script>

eg: i key 1 for x and 2 for y the result i get is 12 instead of 3

pls help