Well my brains are melting... I am trying to accomplish the following:
I know how many arrays and how many elements each array have. These numbers are dynamic, but lets say there's: 3 arrays with 18 elements in each.
Example:
["106","142","112","77","115","127","87","127","156","118","91","93","107","151","110","79","40","186"]
["117","139","127","108","172","113","79","128","121","104","105","117","139","109","137","109","82","137"]
["111","85","110","112","108","109","107","89","104","108","123","93","125","174","129","113","162","159"]
Now I want to get the average of element 1 of all three arrays, and element 2 of all three and so on.
The end result should be one array with the average of all 18 elements.
Something like:
var result_array = [];
for (i = 0; i < 3; i++) {
result_array.push(arrayone[i] + arraytwo[i] + arraythree[i]) / 3
}
This would work if 3 was fixed, but the amount of arrays is dynamic.
Hope this make sense...