daniel2489
03-15-2009, 05:30 PM
Im having truble with this code
in alert(q+w) if q is 3, and w is 4 it will display 34 not 7
and if e==false it still does if r==true
help
[code]
var q=prompt("Type your first number");
var w=prompt("Type your second number");
var e=confirm("do you want to add the two numbers");
if (e==true)
{alert(q+w);
}
else if (e==false)
{var r=confirm("do you want to subtract the two numbers");
}
if (r==true)
{alert(q-w);}
in alert(q+w) if q is 3, and w is 4 it will display 34 not 7
and if e==false it still does if r==true
help
[code]
var q=prompt("Type your first number");
var w=prompt("Type your second number");
var e=confirm("do you want to add the two numbers");
if (e==true)
{alert(q+w);
}
else if (e==false)
{var r=confirm("do you want to subtract the two numbers");
}
if (r==true)
{alert(q-w);}