This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script> | |
<div id='root'></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"author": "Steven", | |
"name": "hello-express", | |
"version": "0.0.1", | |
"description": "A simple Node app built on Express, instantly up and running.", | |
"main": "server.js", | |
"scripts": { | |
"start": "node server.js" | |
}, | |
"dependencies": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const UNITS = { | |
'ONE HUNDRED': 100, | |
'TWENTY': 20, | |
'TEN': 10, | |
'FIVE': 5, | |
'ONE': 1, | |
'QUARTER': 0.25, | |
'DIME': 0.1, | |
'NICKEL': 0.05, | |
'PENNY': 0.01 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function rot13(str) { // LBH QVQ VG! | |
const A_Z = ['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']; | |
function repLetter(L) { | |
if(L > 'M') { | |
return A_Z[(A_Z.indexOf(L)-13)]; | |
} | |
else return A_Z[(A_Z.indexOf(L)+13)]; | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function convertToRoman(num) { | |
const BASE = { | |
'M': 1000, | |
'CM': 900, | |
'D': 500, | |
'CD': 400, | |
'C': 100, | |
'XC': 90, | |
'L': 50, |