Making a library

I can not figure out my student’s error. Can anyone give me insight?

.round is not a valid method for a number in Javascript. Instead, you would have to use either:
Math.round(number), which rounds to the nearest whole number
Math.floor(number), which rounds down to the nearest whole number
or Math.ceil(number), which rounds up to the nearest whole number.

And please have this student learn how to debug his or her code - especially for the last if statement in the code.

1 Like

Thank you! I appreciate the quick response.