Tell us what’s happening:
Describe your issue in detail here.
**Your code so far**
function convertToRoman(num) {
let romanNumeral = "";
while (num > 0) {
if (num < 4) {
romanNumeral += "I";
num --
}else if (num == 4) {
romanNumeral = "IV";
num -= 4;
}else if (num >= 5 && num < 9) {
romanNumeral = "V";
num -= 5;
}else if (num == 9) {
romanNumeral = "IX"
num -= 9
}else if (num >= 10) {
romanNumeral = "X"
num -= 10
}else{
num --;}
}
return romanNumeral;
}
console.log(convertToRoman(16));
**Your browser information:**
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36 OPR/76.0.4017.227
Challenge: Roman Numeral Converter
Link to the challenge: