We've been conducting pair programming exercises at work using the excellent FreeCodeCamp, and came upon an interesting problem to solve using JavaScript. We needed to create a generic function for generating Roman Numeral equivalent for any number within a reasonable range (say, to 10000). This is what we came up with!

You can use it like so: