Ad
function calcGPA(string) {
  string = string.split(' ');
  let total = 0
  string.forEach(x => {
    if (x >= 90) return total += 4
     if (x >= 80) return total += 3
     if (x >= 70) return total += 2
     if (x >= 60) return total += 1
  })
  return total / string.length
}