# Learn Basic JavaScript by Building a Role Playing Game - Step 162Inside your while loop, push a random number between 0 and 10 to the end of the numbers array

**URL:** <https://forum.freecodecamp.org/t/learn-basic-javascript-by-building-a-role-playing-game-step-162inside-your-while-loop-push-a-random-number-between-0-and-10-to-the-end-of-the-numbers-array/681480>\
**Category:** Curriculum Help\
**Tags:** javascript\
**Created:** [March 22, 2024, 4:19pm UTC](https://forum.freecodecamp.org/t/learn-basic-javascript-by-building-a-role-playing-game-step-162inside-your-while-loop-push-a-random-number-between-0-and-10-to-the-end-of-the-numbers-array/681480 "2024-03-22T16:19:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ericgigz9](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ericgigz9/32/357666_2.png) [@ericgigz9](https://forum.freecodecamp.org/u/ericgigz9)\
**Post date:** [March 22, 2024, 4:19pm UTC](https://forum.freecodecamp.org/t/learn-basic-javascript-by-building-a-role-playing-game-step-162inside-your-while-loop-push-a-random-number-between-0-and-10-to-the-end-of-the-numbers-array/681480/1 "2024-03-22T16:19:12Z")

</div>

### Tell us what’s happening:

### Your code so far

WARNING

The challenge seed code and/or your solution exceeded the maximum length we can port over from the challenge.

You will need to take an additional step here so the code you wrote presents in an easy to read format.

Please copy/paste all the editor code showing in the challenge from where you just linked.

````plaintext
Replace these two sentences with your copied code.
Please leave the ``` line above and the ``` line below,
because they allow your code to properly format in the post.

````

### Your browser information:

User Agent is: `Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36 Edg/122.0.0.0`

### Challenge Information:

Learn Basic JavaScript by Building a Role Playing Game - Step 162

> **[freeCodeCamp.org](https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures-v8/learn-basic-javascript-by-building-a-role-playing-game/step-162)**
>
> Learn to Code — For Free

---

<div class="post-metadata">

**Author:** ![jwilkins.oboe](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/jwilkins.oboe/32/179497_2.png) [@jwilkins.oboe](https://forum.freecodecamp.org/u/jwilkins.oboe)\
**Post date:** [March 22, 2024, 4:19pm UTC](https://forum.freecodecamp.org/t/learn-basic-javascript-by-building-a-role-playing-game-step-162inside-your-while-loop-push-a-random-number-between-0-and-10-to-the-end-of-the-numbers-array/681480/2 "2024-03-22T16:19:39Z")

</div>

Please provide your code so we can help you

When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (`</>`) to add backticks around text.

 ![Pre-formatted-text](https://global.discourse-cdn.com/freecodecamp/original/3X/1/b/1b18854f1059217f29370444396145cc3a0cd8ae.gif)

See [this post](https://forum.freecodecamp.org/t/forum-code-formatting/25574) to find the backtick on your keyboard.  
**Note:** Backticks (`) are not single quotes (').

---

<div class="post-metadata">

**Author:** ![jwilkins.oboe](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/jwilkins.oboe/32/179497_2.png) [@jwilkins.oboe](https://forum.freecodecamp.org/u/jwilkins.oboe)\
**Post date:** [March 22, 2024, 4:20pm UTC](https://forum.freecodecamp.org/t/learn-basic-javascript-by-building-a-role-playing-game-step-162inside-your-while-loop-push-a-random-number-between-0-and-10-to-the-end-of-the-numbers-array/681480/3 "2024-03-22T16:20:00Z")

</div>

Also, please let us know what you need help with

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/freecodecamp/original/3X/e/1/e1c433102e34b46dfaa3e15d13ab9a514b127078.svg) [@system](https://forum.freecodecamp.org/u/system)\
**Post date:** [September 21, 2024, 4:20am UTC](https://forum.freecodecamp.org/t/learn-basic-javascript-by-building-a-role-playing-game-step-162inside-your-while-loop-push-a-random-number-between-0-and-10-to-the-end-of-the-numbers-array/681480/4 "2024-09-21T04:20:25Z")

</div>

Closed on September 21, 2024, 4:20am UTC

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.
