Skip to content
Snippets Groups Projects
Commit 11e3d1da authored by K8573's avatar K8573
Browse files

Update script.js

parent 54f0d73a
No related branches found
No related tags found
No related merge requests found
Pipeline #39999 canceled
...@@ -9,7 +9,7 @@ function calculate(x, z) ...@@ -9,7 +9,7 @@ function calculate(x, z)
var y = 0; var y = 0;
for(let i=0; i<x.length; i++) for(let i=0; i<x.length; i++)
{ {
y += parseFloat(x[i]); y += parseFloat(x[i].innerHTML);
} }
document.getElementById(z).innerHTML = "Yhteensä: " + y; document.getElementById(z).innerHTML = "Yhteensä: " + y;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment