hi guys dont seem to get past this where am i going wrong please anyoe with knowledge
Describe your issue in detail here.
Your code so far
function convertToRoman(num) {
let romannumerals ={
M: 1000,
CM: 900,
D: 500,
CD: 400,
C: 100,
XC: 90,
L: 50,
XL: 40,
X: 10,
IX: 9,
V: 5,
IV: 4,
I: 1
}
let result = '';
for (let prop in romannumerals) {
//console.log(prop);
//console.log(romannumerals[prop]);
while(num >= romannumerals[prop]) {
result -= prop;
num -= romannumerals[prop];
}
}
return result;
}
convertToRoman(36)
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36 Edg/115.0.1901.188
Challenge: JavaScript Algorithms and Data Structures Projects - Roman Numeral Converter
Link to the challenge: