Is it possible to create a dynamic array using something like this and store X elements, then get the average? How would that be possible?
$(xml).find('student').each(function(){
var name = $(this).find("name").text();
var myArray = DYNAMIC ELEMENTS
student_list.append("<tr><td>"+name+"</td><td>"+cid+"</td><td>"+grade+"</td></tr>");
});
I want to store a set of grades for each class, then get the average of ALL the elements in the array. I would need to get a count of all the elements for it has increasing "key:value" Correct?
Along these lines: myArray[1] = "54" = myArray[i] = g <- dynamic
Ryan