**Tell us what’s happening:**

I mean, it works, but just looking at some of the other answers out there, it feels like a fail.

**Your code so far**

```
function convertToRoman(num) {
let romNumeralArray = [];
while(num >= 1000){
num = num - 1000;
romNumeralArray.push("M");
}
while(num >= 900){
num = num - 900;
romNumeralArray.push("CM");
}
while(num >= 500){
num = num - 500;
romNumeralArray.push("D");
}
while(num >= 400){
num = num - 400;
romNumeralArray.push("CD");
}
while(num >= 100){
num = num - 100;
romNumeralArray.push("C");
}
while(num >= 90){
num = num - 90;
romNumeralArray.push("XC");
}
while(num >= 50){
num = num - 50;
romNumeralArray.push("L");
}
while(num >= 40){
num = num - 40;
romNumeralArray.push("XL");
}
while(num >= 10){
num = num - 10;
romNumeralArray.push("X");
}
while(num >= 9){
num = num - 9;
romNumeralArray.push("IX");
}
while(num >= 5){
num = num - 5;
romNumeralArray.push("V");
}
while(num >= 4){
num = num - 4;
romNumeralArray.push("IV");
}
while(num >= 1){
num = num - 1;
romNumeralArray.push("I");
}
let string = romNumeralArray.join();
return string.replace(/[,]/g, "");
}
```

**Your browser information:**

User Agent is: `Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36`

.

**Challenge:** Roman Numeral Converter

**Link to the challenge:**

https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/javascript-algorithms-and-data-structures-projects/roman-numeral-converter