function Time(t1,t2){
t = t1 + t2
return t;
}
if t1 = 2, t2 = 4,
then i get this in return: 24, instead of 6. How do i make it add instead of append?
Printable View
function Time(t1,t2){
t = t1 + t2
return t;
}
if t1 = 2, t2 = 4,
then i get this in return: 24, instead of 6. How do i make it add instead of append?
Code:function Time(t1,t2){
t = parseInt(t1) + parseInt(t2);
return t;
}