---
id: 5dbc2d056ef5fe3a704f84a2
title: Part 139
challengeType: 0
---
## Description
Inside `pick`, create a `while` loop to run the same code multiple times. The code inside the `while` loop should keep repeating while `numbers.length` is less than 10 and stop once that condition is no longer true.
Here is an example of a while loop that repeats code inside the loop while `i` is less than five.
```js
let ourArray = [];
let i = 0;
while(i < 5) {
ourArray.push(i);
i++;
}
// ourArray now equals [0,1,2,3,4]
```
## Instructions
## Tests
```yml
tests:
- text: See description above for instructions.
testString: assert(pick.toString().replace(/\s/g, '').includes('while(numbers.length<10){if(_LPC++%2000===0&&Date.now()-_LP>1500){')); # Take loop protect into account
```
## Challenge Seed
```html
```
### Before Test
```html
RPG - Dragon Repeller
XP: 0Health: 100Gold: 50
Monster Name: Health:
Welcome to Dragon Repeller. You must defeat the dragon that is preventing people from leaving the town. You are in the town square. Where do you want to go? Use the buttons above.