I am new so thank you for your patience. I did search a lot for the answer but couldn't find, maybe because it's too obvious.
In this case the inputs x and y are taken from <input type="number"..
This function executes upon button click.
Can you tell me why it returns a concatenation, e.g. 33 instead of 6, 45 instead of 9.
function sum(x,y) {
x = document.getElementById("x").value;
y = document.getElementById("y").value;
var answer = x+y;
document.getElementById("sum").innerHTML = answer;
}
Many thanks in advance.