I am trying to calculate cell 2 and cell 3 of the table on every row in which the result will show in cell 4 and cell 4 will be multiplied by 1.96 in order to calculate cell 5
function Calculate()
{
let calc = document.getElementById("tblCalc").querySelectorAll("tr");
rows.cells [4] = rows[1,2,3,4,5].cells[3].value/1000*cells[2].value;
rows.cells [5] = rows[1,2,3,4,5].cells[4].value*1.96;
for (var i = 0 < calc.rows.cells; i++; )
{
document.getElementById("result1").value;
document.getElementById("result2").value = document.getElementById("result1").value*1.96;
}
here is 1 part of my html
<table id="tblCalc">
<tr>
<th>Ingredient</th>
<th>Prijs per kilo</th>
<th>Nodig voor de 25cm pizza in gram</th>
<th>25cm pizza</th>
<th>35cm pizza</th>
</tr>
<tr>
<td><input type="text"></td>
<td><input type="number"></td>
<td><input type="number"> </td>
<td><input type="number" readonly></td>
<td><input type="number" readonly></td>
</tr>
<tr>
<td><input type="text" ></td>
<td><input type="text"></td>
<td><input type="text" ></td>
<td><input type="text" readonly></td>
<td><input type="text" readonly></td>
</tr>
<input type="number" readonly id="result1">
<br>
<input type="number" readonly id="result2">
<br>
<button onclick="Calculate()">Calculate</button>