im trying to calculate currency but when i try it calculates only first number (1.25$+1.25$ returns 2$) this is the code that i made <-- done
var table = document.getElementById("table"), sumVal = 0;
for (var i = 1; i < table.rows.length; i++)
{
sumVal = sumVal + parseInt(table.rows[i].cells[3].innerHTML);
}
document.getElementById("val").innerHTML = +sumVal + "€";
console.log(sumVal);
what should i add or edit so i can calculate entire value of that row and return 2 dollars and 50 cents