Roman numeral converter algorithm

convertToRoman(
)
Returns:
 

I created this algorithm as a requirement for my freeCodeCamp JavaScript Algorithms and Data Structures Certification. It converts the number given into a Roman numeral.