I have an unknown count. inputov with one class. I need to take from all the values and sum up and display 1 number at the end. How i did
$( ".input_quantity" ).each(function() { var arr = new Array(); arr.push(Number($(this).val())); var summ =0; for (var i =0; i< arr.length; i++) { summ +=arr[i]; } console.log(summ); }); It does not go to summarize, each number and input are displayed separately. Most likely, I chose the wrong counting method - through ".each". Tell me another idea?