Skip to content

Latest commit

 

History

History

2011-roman-numerals

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Roman Numerals Coding Kata

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

The problem

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