Roman numeral solution not working

https://jsfiddle.net/torggya/sahvxw4t/3/

Hey guys. So if you check my above fiddle, it works well in there, but moving it over to the fcc editor does not pass, even though the roman numerals return correctly. Any idea why?

Damn, that was it? That’s… annoying. XD

Well, that said, please review my code! It’s not very elegant I know, but it works xD I know there are shorter and more efficient ways to do this, I just don’t have that knowledge yet xD