I am creating the following array from data attributes and I need to be able to grab the highest and lowest value from it so I can pass it to another function later on.
if you have "scattered" (not inside an array) values you can use:
var max_value = Math.max(val1, val2, val3, val4, val5);