├── ex00 └── my_roman_numerals_converter.js └── README.md /ex00/my_roman_numerals_converter.js: -------------------------------------------------------------------------------- 1 | function my_roman_numerals_converter(nums) { 2 | if (isNaN(nums)) 3 | return NaN; 4 | var digits = String(+nums).split(""), 5 | key = ["","C","CC","CCC","CD","D","DC","DCC","DCCC","CM", 6 | "","X","XX","XXX","XL","L","LX","LXX","LXXX","XC", 7 | "","I","II","III","IV","V","VI","VII","VIII","IX"], 8 | roman = "", 9 | i = 3; 10 | while (i--) 11 | roman = (key[+digits.pop() + (i * 10)] || "") + roman; 12 | return Array(+digits.join("") + 1).join("M") + roman; 13 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Welcome to My Roman Numerals Converter 2 | *** 3 | 4 | ## Task 5 | For each exercise, you will have to create a folder and in this folder, 6 | you will have additional files that contain your work. 7 | Folder names are provided at the beginning of each exercise under submit directory and specific 8 | file names for each exercise are also provided at the beginning of each exercise under submit file(s). 9 | 10 | ## Description 11 | Remember to git add && git commit && git push each exercise! 12 | We will execute your function with our test(s), 13 | please DO NOT PROVIDE ANY TEST(S) in your file 14 | 15 | ## Installation 16 | not installed 17 | 18 | ## Usage 19 | TODO - How does it work? 20 | ``` 21 | ./my_project argument1 argument2 22 | ``` 23 | 24 | ### The Core Team 25 | 26 | 27 | Made at Qwasar Silicon Valley 28 | Qwasar Silicon Valley Logo 29 | --------------------------------------------------------------------------------