tin.onchange = addNewValue;
function addNewValue(e){
c1 = e.target.value;
console.log(c1);
return c1;
}
tin2.onchange = addNewValue2;
function addNewValue2(f){
c2 = f.target.value;
return c2;
}
line2 = c1 + c2;
;
console.log(line2);
I am trying to have the variable which is filled with the user by a dynamic appearing form return to a string which I can add to the original string. But the link between them doesn't work.
What am I missing?