hi i need to create a Average variable that will average out my grades any help will be greatly appreciated i have the following. but i cant figure out the average portion of it

my code works for the inputs and gets the grades, and i also have the html portion 
and i have an empty p tag for all of the inner html

```
function myFunction(){

let math = document.getElementById("math").value;
let science = document.getElementById("science").value;
let history = document.getElementById("history").value;
let english = document.getElementById("english").value;
let average = ( [ "math","science","history","english",  ] );

// this is match sec
if(math >= 90) {
    document.getElementById("mathG").innerHTML = "Your Grade is A"
}

else if (math >= 80 && math < 90) {
    document.getElementById("mathG").innerHTML = "Your Grade is B"
}

else if (math >= 70 && math < 80) {
    document.getElementById("mathG").innerHTML = "Your Grade is c"
}

else if (math >= 60 && math < 70) {
    document.getElementById("mathG").innerHTML = "Your Grade is d"

}

else  {
    document.getElementById("mathG").innerHTML = "Your Grade is F"

}

// Science section

if(science >= 90) {
    document.getElementById("scienceG").innerHTML = "Your Grade is A"
}

else if (science >= 80 && science < 90) {
    document.getElementById("scienceG").innerHTML = "Your Grade is B"
}

else if (science >= 70 && science < 80) {
    document.getElementById("scienceG").innerHTML = "Your Grade is c"
}

else if (science >= 60 && science < 70) {
    document.getElementById("scienceG").innerHTML = "Your Grade is d"

}

else  {
    document.getElementById("scienceG").innerHTML = "Your Grade is F"

}

// History

if(history >= 90) {
    document.getElementById("historyG").innerHTML = "Your Grade is A"
}

else if (history >= 80 && history < 90) {
    document.getElementById("historyG").innerHTML = "Your Grade is B"
}

else if (history >= 70 && history < 80) {
    document.getElementById("historyG").innerHTML = "Your Grade is c"
}

else if (history >= 60 && history < 70) {
    document.getElementById("historyG").innerHTML = "Your Grade is d"

}

else  {
    document.getElementById("historyG").innerHTML = "Your Grade is F"

}

//English
english

if(english >= 90) {
    document.getElementById("englishG").innerHTML = "Your Grade is A"
}

else if (english >= 80 && english < 90) {
    document.getElementById("englishG").innerHTML = "Your Grade is B"
}

else if (english >= 70 && english < 80) {
    document.getElementById("englishG").innerHTML = "Your Grade is c"
}

else if (english >= 60 && english < 70) {
    document.getElementById("englishG").innerHTML = "Your Grade is d"

}

else  {
    document.getElementById("englishG").innerHTML = "Your Grade is F"

}

```