manudavidos / GradeCalculator

0 stars 0 forks source link

Workaround?! #1

Closed manudavidos closed 4 years ago

manudavidos commented 4 years ago

@satenikmnatsakanyan-aua In the script.js file, I tried to implement if checks and output "errors". I think what I did is a workaround: finalgrade = "Error";

Can you please suggest a better way of getting the same result?

satenikmnatsakanyan-aua commented 4 years ago

@manudavidos variable is better to use as Boolean instead of text comparison. I just committed the change

manudavidos commented 4 years ago

@satenikmnatsakanyan-aua Thank you very much!!! So is this the typical way that error checking is done in pure JS?

satenikmnatsakanyan-aua commented 4 years ago

@manudavidos yes for the error checking in the function but not for the highlight - there is another argument/event called onchange/onblur/onkeyup - please try to read about them if you cannot implement that I will help on Friday.

manudavidos commented 4 years ago

I'm closing this issue as now everything works as expected. Thank you!