+ 1
How to sum numbers in a table?
I’ve created a table in HTML with <table> and now I would like to write a JS function: my goal is that the user could write any number in the first row, another number in the second and in the third the function would add the two numbers and write the sum automatically. Is it possible? Thank you for your help!
5 Respuestas
+ 1
It depends on how you render your table, if it's Javascript you will have an array with the content so you can use reduce and get a last value and then render as a <tfoot>
+ 1
it's not a table but a form but as a start it's ok for me now.
https://code.sololearn.com/WTL30eaR40X5/#html
0
Show your attempt first
0
i dont have one, just created a table with three rows and thats all. i am lost
0
Link your code that you tried