GitHunt
RU

rue-eru/FCC-JS-2-roman-numeral-converter

Roman Numeral Converter | A simple project made for FreeCodeCamp's JavaScript Algorithms and Data Structures course

HTML5
CSS3
JavaScript
Roman Numerals

An old project build back in 2024 as the start of my journey and posted here to preserve my path.

A Roman numeral converter application โ€” the second project in FreeCodeCamp's JavaScript Algorithms and Data Structures certification. Converts Arabic numbers (1-3999) into Roman numerals with proper subtraction notation (IV, IX, XL, XC, CD, CM).

The project only consists of JavaScript + HTML + CSS and was made as a part of FreeCodeCamp's JavaScript Algorithms and Data Structures course.


๐Ÿ“‹ Project Requirements

This project fulfills all 10 user stories from FreeCodeCamp's "Build a Roman Numeral Converter" challenge:

Click to expand the full requirements

User Stories:

  • input element with id="number"
  • button element with id="convert-btn"
  • div, span, or p element with id="output"
  • Empty input โ†’ "Please enter a valid number"
  • Number < 1 โ†’ "Please enter a number greater than or equal to 1"
  • Number โ‰ฅ 4000 โ†’ "Please enter a number less than or equal to 3999"
  • 9 โ†’ "IX"
  • 16 โ†’ "XVI"
  • 649 โ†’ "DCXLIX"
  • 1023 โ†’ "MXXIII"
  • 3999 โ†’ "MMMCMXCIX"

All tests passed โœ…


๐ŸŽจ About the Project

The project only works in a range from 1 to 3999 so it didn't feel that hard as the Palindrome one. As far as I remember I especially liked the EventListener applying effects on pressing buttons back then. Still getting the logic right required more research to accomplish the project. It's a simple one function logic but still so sharp.

Roman Numeral Converter Preview
Page Gif
submitted to FreeCodeCamp on Nov 16, 2024

๐Ÿ”— Live Demo

Live Demo

My official FreeCodeCamp JavaScript Algorithms and Data Structures Certificate
Certificate

Languages

CSS42.3%JavaScript37.4%HTML20.4%

Contributors

GNU General Public License v3.0
Created February 12, 2026
Updated February 12, 2026