diff --git a/app.js b/app.js index 0d03661..c326d0b 100644 --- a/app.js +++ b/app.js @@ -58,6 +58,7 @@ var App = new Vue({ * @return {[string]} [roman numeral conversion of provided whole number] */ function intToRoman(n) { + if (n <= 0 || n >= 5000) return ''; // Set up mapping to compare crucial roman numerals to their integet values var mapping = { 'M': 1000, 'CM': 900, 'D': 500, 'CD': 400, 'C': 100, diff --git a/index.html b/index.html index f76bfbd..06d7203 100644 --- a/index.html +++ b/index.html @@ -34,7 +34,7 @@ Roman Numerals

{{ result }}

-

{{ resultRoman }}

+

{{ resultRoman }}