The code below outputs numeric data
var meshInstances = entity.model.meshInstances;
var mat;
for(var i = 0; i < meshInstances.length; i++) {
// mat = meshInstances[i].mesh.vertexBuffer.numVertices;
mat = parseFloat(meshInstances[i].mesh.indexBuffer[0].numIndices / 3);
console.log(mat);
How to output this data as a sum of all responses? 1 Line with sum

matto a total variable, then output the variable after the loop is done.total += mat;matby theparseFloatamount each time, rather than keep reassigning the value. Also, you could refactor the function with aArray.reducemethod.