Hi there,

I'm busy with my Js final project at the end of my Js "kinda" beginners course. The website set up for the final project requires a section including a form used to calculate different prices (budgets) for different websites depending on the different options chosen in the form. My last line for this callculation goes like this:

document.getElementById("resultado").value = total + total_check + ' euros';
The problem is, I know it is not new at all in this forum, that "total" and "total_check" variables, containing numeric values, don't get mathematically added through the line of code I wrote, but written side by side, as two different pieces of text, in the "id:resultado" <input type="text">.

My doubts:

1.- Should I have specified through parseInt or parseFloat ("total" variable might result on a decimal value depending on the options chosen in the form), somewhere earlier in the code, that "total" and "total_check" variables would be numeric values used for mathematical operations or is it possible to do it in this last line of code alone?

2.- If it can be done in this last line, how exactly should this last line look like?

Thx very much in advance.