I am basing my question and example on Jason\'s answer in this question
I am trying to avoid using an eventListener
, and just to call handleClick
Everything seems to be perfect in your code except the fact that handleClick() isn't working because this function lacks a parameter in its function call invocation(but the function definition within has an argument which makes a function mismatch to occur).
The following is a sample working code for calculating all semester's total marks and corresponding grade. It demonstrates the use of a JavaScript function(call) within a html file and also solves the problem you are facing.
Semester Results
Semester Marks
Semester 1:
Semester 2:
Semester 3:
Semester 4:
Semester 5:
Semester 6: