I have a section of code as follows:
var percentageTemp =((parseInt(score)/parseInt(guesses))*100);
var percentage= percentageTemp.toFixed(2);
score and guesses are both set to 0 at the start of the code, and are altered as the user plays the game. The code works as it should, exept if I leave score variable 0, I get a NaN output.
Why am I getting the NaN output when score = 0?