How to add up the numbers in div?

Hi all.
This question:
I have a ul > li > p, div
How to find sum of numbers in a div?
P. S. new div will enter the input ( now it's not so important).

June 7th 19 at 15:45
1 answer
June 7th 19 at 15:47
var sumDiv = 0;
$('li div').each(function(){
var html = $(this).text() ;
sumDiv += Number(html);
thanks) - fredrick_Walsh commented on June 7th 19 at 15:50

Find more questions by tags JavaScriptjQuery