Answer the question
In order to leave comments, you need to log in
How to implement such a calculator in js?
Hello,
I have a simple code:
<input type="text" value="100" placeholder="Введите вес продукта">
<ul>
<li>Белки: 23 гр</li>
<li>Жиры: 1,9 гр</li>
<li>Углеводы: 0,4 гр</li>
<li>Калории: 113 ккал</li>
</ul>
Answer the question
In order to leave comments, you need to log in
https://jsfiddle.net/deadvf29/
Instead of Math.random, you need to substitute some formulas or tables by which values are calculated.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question