I'm learning JavaScript and I'm breaking my head with this code I created. Why is my function concatenating instead of adding up the numbers I store in variables?
<!DOCTYPE html>
<html>
<head>
<title>Aula 05 Java Script</title>
<meta charset="utf-8">
<script type="text/javascript">
var num1,num2;
num1 = prompt("Digite um número ","");
num2 = prompt("Digite outro número para somar ","");
function soma(){
var res;
res=num1+num2;
alert("Reultado da Operação "+ res);
}
soma();
</script>
</head>
<body>
</body>
</html>