Skip to content

Instantly share code, notes, and snippets.

Avatar

Jussi Laasonen jlaasonen

View GitHub Profile
@jlaasonen
jlaasonen / convertToRoman.js
Created Mar 25, 2019
Convert a number into Roman numeral
View convertToRoman.js
// Derived from https://stackoverflow.com/questions/9083037/convert-a-number-into-a-roman-numeral-in-javascript#37723879
import { List } from 'immutable'
const romanMatrix = List.of(
List.of(1000, 'M'),
List.of(900, 'CM'),
List.of(500, 'D'),
List.of(400, 'CD'),
List.of(100, 'C'),
List.of(90, 'XC'),
You can’t perform that action at this time.