# Array is not adding correctly

**URL:** <https://forum.code.org/t/array-is-not-adding-correctly/34746>\
**Category:** AP Prep\
**Created:** [May 19, 2021, 9:40pm UTC](https://forum.code.org/t/array-is-not-adding-correctly/34746 "2021-05-19T21:40:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![craigwill.contact](https://avatars.discourse-cdn.com/v4/letter/c/c68b51/32.png) [@craigwill.contact](https://forum.code.org/u/craigwill.contact)\
**Post date:** [May 19, 2021, 9:40pm UTC](https://forum.code.org/t/array-is-not-adding-correctly/34746/1 "2021-05-19T21:40:40Z")

</div>

I have a student whose code looks fine to me. The problem is the array keeps adding incorrectly. It doubles the numbers after the first item entered. Any ideas?

[Tip Calculator](https://studio.code.org/projects/applab/Jif_pCckpRP1d06qVAixPYZ_McV-un8V7HfxdSLWIPI)

---

<div class="post-metadata">

**Author:** ![madeline\_r\_burton](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/madeline_r_burton/32/5037_2.png) [@madeline\_r\_burton](https://forum.code.org/u/madeline_r_burton)\
**Post date:** [May 20, 2021, 1:20pm UTC](https://forum.code.org/t/array-is-not-adding-correctly/34746/2 "2021-05-20T13:20:53Z")

</div>

Hi

Out of an abundance of caution on the last day before the create task is due, we are not answering debugging questions that are not directly related to the curriculum. I would be happy to help tomorrow if you are still having issues. If so, please respond using the format of the debugging threads so that we have a little more information to help guide you:

- Link to the project or level:
- What I expect to happen:
- What actually happens:
- What I’ve tried:

Until then, here are some general debugging guidelines to help pinpoint the issue:

- Use console.log statements to see the values of the variables and narrow down where the problem may be occurring.
- Use the debugger - breakpoints and watchers to debug the issue you are facing
- What line is causing this behavior? Can you remove/comment outlines to remove the error?
- How is this project similar to others students have written? Can they use any of them as a template?

Please reach out after the due date if you still need help.
