Skip to content

Commit

Permalink
Add a grand total
Browse files Browse the repository at this point in the history
  • Loading branch information
Rosuav committed Apr 21, 2024
1 parent 5f35b0d commit 27bd1e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion basics.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
TD(INPUT({class: "next", "data-idx": i, type: "number", value: ""+nexts[i]})),
TD("" + (values[i] + (values[i+1] || 0))),
])),
TR([TD(), TD("Migrate"), TD(BUTTON({id: "migrate"}, "<==")), TD()]),
TR([TD(), TD("Migrate"), TD(BUTTON({id: "migrate"}, "<==")), TD("" + values.reduce((a,b)=>a+b))]),
]));
localStorage.setItem("state", JSON.stringify({values, nexts}));
}
Expand Down

0 comments on commit 27bd1e7

Please sign in to comment.