I'm using find to get values on my variable, but when this variable return multiples values, my condition can't read them.
What I need is sum this variable values, returning just one number.
Code:
mail.forEach(function(m) {
var nresult = $("#dat").contents()
.find("td:contains('" + m.hexEncode() + "')" )
.length;
return nresult;
});
I need to keep this forEach function - is the only way to keep my external data working, so, this will return, in that case, this values: 0,0,1,1,0, and I need just 2 on return.
How can I do that? Thanks!
nresultan array of values?