I write a function and try to add two number on it, But when I use ' + ' operator between two operators it's concate them. On the other hand if I use '-' operator then no problem. How can I fix it ?
var a = prompt("Enter value of a : ");
var b = prompt("Enter value of b : ");
sum(a, b);
function sum(a, b){
document.write("A + B = "+ (a+b) );
}