Skip to content

Simple JavaScript function that converts Arabic to Roman numbers (<= 39999)

License

Notifications You must be signed in to change notification settings

sasatatar/convertToRoman

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

convertToRoman

Simple JavaScript function that converts Arabic to Roman numbers

Function supports numbers up to 39999. The function can be easily extended to support even bigger numbers.
The symbols for 5000 and 10000 are not pure alphabetic characters, so I used lower case v and x.

Roman numerals:
I = 1
V = 5
X = 10
L = 50
C = 100
D = 500
M = 1000
v = 5000
x = 10000

USAGE

convertToRoman(39); // returns 'XXXIX'

About

Simple JavaScript function that converts Arabic to Roman numbers (<= 39999)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published