if x,y,z are all 1 its giving the answer 111 rather than 3
x=prompt ("Enter first Number");
y=prompt ("Enter second Number");
z=prompt ("Enter third Number");
p= x + y + z ;
if x,y,z are all 1 its giving the answer 111 rather than 3
x=prompt ("Enter first Number");
y=prompt ("Enter second Number");
z=prompt ("Enter third Number");
p= x + y + z ;
You could use something like this
x = parseInt(prompt("Enter first Number"), 10);
y = parseInt(prompt("Enter second Number"), 10);
z = parseInt(prompt("Enter third Number"), 10);
p = x + y + z;
console.log(p)