I need to make a function that returns the lowest number in my array, I can't seem to figure this out and the other questions on here didn't help at all because they gave answers with code i had never seen before, so i have this but it always just returns "0" not 80, so can you help me with my code?
var value = [100, 90, 100, 80];
function lowestGrade(a) {
for (var i = 0; i < a.length; i++) {
if (a[i] < a.length);
value = i; {
return (value);
}
}
}
document.write(lowestGrade(value));