as you may see over the link (https://jsfiddle.net/andresmcio/vLp84acv/) is a simple form that stores data as:
var _newStudent = {
"code": code,
"names": names,
"grade": grades,
};
I'm having trouble getting the highest and lowest grade with their respective buttons as it is showing the last entry as either maximum and minimum value.
Would be glad if anyone could help, keeping in mind that it should be displayed as it is (With the alerts) and only using javascript, not jquery or any other.
Thanks beforehand.