Answer the question
In order to leave comments, you need to log in
What is the right way to write code that will return and sum values?
Sorry for the repeated question, but I just can't figure out this calculator, I'm not strong in js, so this is a bit difficult for me. It is necessary that all values from the inputs be summed up, but if, for example, the checkbox is unchecked, then the "sum" of this checkbox is subtracted back from the total sum. Thank you all))
How to write this code correctly? JSfiddle link
https://jsfiddle.net/eu80q9g2/
Answer the question
In order to leave comments, you need to log in
Here it is also desirable to pull up the HTML. I myself am not an expert in JS, but I will offer a head-on solution.
https://jsfiddle.net/eu80q9g2/1/ , although for some reason everything is inactive there, but if you copy it into an html document, then everything works.
It is necessary that all values from the inputs are summed up
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question