Roman Numeral Converter--going beyond 20 :(

Tell us what’s happening:
cant figure out how to check the digits place!

Your code so far

function convertToRoman(num) {
 const romanNumbers=["I","II","III","IV","V","VI","VII","VIII","IX","X"];
 {return (romanNumbers[num-1]);}
else if(num>10&&num<20){
    let reg =num%10;
    return (`${romanNumbers[num-1]}`+`${romanNumbers[reg-1]}`);

    return num;

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.86 Safari/537.36.

Link to the challenge:

Instead of trying to list every possible roman numeral in your array, I suggest looking at the logic of how roman numerals are composed.