# Making a library

**URL:** <https://forum.code.org/t/making-a-library/37584>\
**Category:** Coding and Debugging Help\
**Created:** [February 2, 2023, 6:34pm UTC](https://forum.code.org/t/making-a-library/37584 "2023-02-02T18:34:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rona\_williams](https://avatars.discourse-cdn.com/v4/letter/r/c6cbf5/32.png) [@rona\_williams](https://forum.code.org/u/rona_williams)\
**Post date:** [February 2, 2023, 6:34pm UTC](https://forum.code.org/t/making-a-library/37584/1 "2023-02-02T18:34:13Z")

</div>

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

 ![image](https://us1.discourse-cdn.com/flex016/uploads/codeorgforum/original/2X/9/93d50fd7db176f60bfa9a7ccfc43d8057308d294.png)

---

<div class="post-metadata">

**Author:** ![letti42](https://avatars.discourse-cdn.com/v4/letter/l/7ea924/32.png) [@letti42](https://forum.code.org/u/letti42)\
**Post date:** [February 2, 2023, 6:57pm UTC](https://forum.code.org/t/making-a-library/37584/2 "2023-02-02T18:57:37Z")

</div>

`.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.

---

<div class="post-metadata">

**Author:** ![rona\_williams](https://avatars.discourse-cdn.com/v4/letter/r/c6cbf5/32.png) [@rona\_williams](https://forum.code.org/u/rona_williams)\
**Post date:** [February 2, 2023, 7:02pm UTC](https://forum.code.org/t/making-a-library/37584/3 "2023-02-02T19:02:32Z")

</div>

Thank you! I appreciate the quick response.
