-2
I have a function that takes values from a document via parser:
var soma = 0;
$(document).ready(function () {
$.get(file, function (data) {
ivps = parseDataToIvp(data);
let fIvps = ivps.filter(i => i.idleTime < -60)
fIvps.map(i => console.log(i.idleTime))
soma = fIvps.map(i => i.idleTime).reduce((a,b) => a + b);
console.log(soma);
});
});
I would like to write this "sum" result inside my div in HTML, but I’m not getting, anyone has any idea?
<div class="count"></div>
Felipe Deolindo, take a test using the code I added as an answer and tell me if that’s what you wanted.
– RXSD