The purpose of this exercise is not simply to solve the problem; instead, we are interested in how you approach the problem.
Please develop this as you would a piece of production code, with all the functional and non-functional considerations that implies. We are particularly interested in the following:
- Testing
- Performance
- Maintainability
We need to write a JavaScript function that converts a number into a Roman Numeral.
function romanNumeralGenerator (int) {
}
For example, see the following sample inputs and outputs:
1 = "I"
5 = "V"
10 = "X"
20 = "XX"
3999 = "MMMCMXCIX"
Caveat: Only support numbers between 1 and 3999
For an in-depth description of Roman Numerals, see http://en.wikipedia.org/wiki/Roman_numerals