**Tell us what’s happening:**

Hi. So i solved this challenge and i am proud for it but i am really sad due to the fact that my code is far longer than the suggested solutions. What are your thoughts about this? Would an employer hire me with this kind of logic?

**Your code so far**

```
function translate(arr){
let roman;
let romans = {
units:{
0:'',
1:'I',
2:'II',
3:'III',
4:'IV',
5:'V',
6:'VI',
7:'VII',
8:'VIII',
9:'IX'
},
tens:{
0:'',
1:'X',
2:'XX',
3:'XXX',
4:'XL',
5:'L',
6:'LX',
7:'LXX',
8:'LXXX',
9:'XC'
},
hundrends:{
0:'',
1:'C',
2:'CC',
3:'CCC',
4:'CD',
5:'D',
6:'DC',
7:'DCC',
8:'DCCC',
9:'CM'
},
thousands:{
0:'',
1:'M',
2:'MM',
3:'MMM',
4:'MMMM',
5:'MMMMM',
6:'MMMMMM',
7:'MMMMMMM',
8:'MMMMMMMM',
9:'MMMMMMMMM'
}
};
if(arr.length==1){
roman = romans['units'][arr[0]];
}
else if(arr.length==2){
roman = romans['tens'][arr[0]] + romans['units'][arr[1]];
}else if (arr.length==3){
roman = romans['hundrends'][arr[0]] + romans['tens'][arr[1]] + romans['units'][arr[2]];
}else if(arr.length==4){
roman = romans['thousands'][arr[0]] + romans['hundrends'][arr[1]] + romans['tens'][arr[2]] + romans['units'][arr[3]];
}
return roman;
}
function convertToRoman(num){
let thousand,hundrend,ten,unit;
let arr = [];
if(num/1000>=1){
thousand = Math.floor(num/1000);
arr.push(thousand);
num=num%1000;
}
if(num/100>=1){
hundrend = Math.floor(num/100);
arr.push(hundrend);
num=num%100;
console.log(num);
}else{
hundrend=0;
num=num%100;
arr.push(hundrend);
}
if(num/10>=1){
ten = Math.floor(num/10);
arr.push(ten);
num=num%10;
}else{
ten=0;
num=num%10;
arr.push(ten);
}
if(num/1>=1){
unit = num;
arr.push(unit);
return translate(arr);
}else{
unit=0;
num=0;
arr.push(num);
return translate(arr);
}
}
```

```
**Your browser information:**
```

User Agent is: `Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36`

.

**Challenge:** Roman Numeral Converter

**Link to the challenge:**