A Pen by Christonja on CodePen.
Arrays exercise on web dev bootcamp by Colt Steele, all my own solutions.
<head> | |
<!--Website follows a FreeCodeCamp tutorial where it is designed based on a pre-existing example website | |
created by FreeCodeCamp however all code is original and created from scratch by 'Christonja'--> | |
<!--test script courtesy of Free Code Camp--> | |
<script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script> | |
<!--Google Fonts--> | |
<link href="https://fonts.googleapis.com/css?family=Offside|Raleway" rel="stylesheet"> |
<!--Website follows a FreeCodeCamp tutorial where it is designed based on a pre-existing example website | |
created by FreeCodeCamp however all code is original and created from scratch by 'Christonja'--> | |
<!--test script courtesy of Free Code Camp--> | |
<script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script> | |
<!--Google Fonts--> | |
<link href="https://fonts.googleapis.com/css?family=Dosis" rel="stylesheet"> | |
<h1 id="title">Survey Form<h1> |
<!--Website follows a FreeCodeCamp tutorial where it is designed based on a pre-existing example website | |
created by FreeCodeCamp however all code is original and created from scratch by 'Christonja'--> | |
<!--test script courtesy of Free Code Camp--> | |
<script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script> | |
<!--Google Fonts--> | |
<link href="https://fonts.googleapis.com/css?family=Acme|IM+Fell+English+SC" rel="stylesheet"> | |
<body id="main"> |
<!--Website follows a FreeCodeCamp tutorial where it is designed based on a pre-existing example website | |
created by FreeCodeCamp however all code is original and created from scratch by 'Christonja'--> | |
<!--test script courtesy of Free Code Camp--> | |
<script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script> | |
<!--Google Fonts--> | |
<link href="https://fonts.googleapis.com/css?family=Montserrat" rel="stylesheet"> | |
<nav id="navbar"> |
<head> | |
<!--Website follows a FreeCodeCamp tutorial where it is designed, loosely following a pre-existing | |
example website created by FreeCodeCamp however all code is original and created from scratch by 'Christonja'--> | |
<!--test script courtesy of Free Code Camp--> | |
<script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script> | |
<!--Google Fonts--> | |
<link href="https://fonts.googleapis.com/css?family=Antic|Fredericka+the+Great" rel="stylesheet"> | |
</head> |
A Pen by Christonja on CodePen.
Arrays exercise on web dev bootcamp by Colt Steele, all my own solutions.
/* JavaScript Algorithms and Data Structures Projects: Cash Register: Challenge designed by FreeCodeCamp, | |
solution derived completely from my learning obtained thanks to FreeCodeCamp and other sources on the internet. | |
Function calls provided by FreeCodeCamp as ways to test the algorithm */ | |
function checkCashRegister(price, cash, cid) { | |
var changeDue = cash - price; //change required from cash given minus cost of purchase | |
var totalChange = { status: "OPEN", change: [] }; //new object that is initialised with an open status and empty array by default | |
var changeCount = 0; //counter | |
var tempChange; //temporary variable to assist with decrementing the change due, however it could be implemented without this | |
var tempCash; //gets the money out of the cash drawer for the currency unit we're working with |
/*JavaScript Algorithms and Data Structures Projects: Telephone Number Validator: | |
Challenge designed by FreeCodeCamp, solution derived from learning obtained thanks to FreeCodeCamp and with | |
some assistance from other people's solutions on the internet. I'm not willing to take ownership of the below | |
code beyond that I was on the right track. ie. completely my solution however forgot about the ? syntax as an | |
option and therefore followed someone elses example to implement this into my solution. Once I figured out how | |
it worked for the first part of the regular expression I debugged the remainder myself and implemented the ? | |
regex syntax without following any examples. | |
Function calls provided by FreeCodeCamp as ways to test the algorithm*/ | |
function telephoneCheck(str) { |
/*JavaScript Algorithms and Data Structures Projects: Roman Numeral Converter: | |
Challenge designed by FreeCodeCamp, solution derived from learning obtained thanks to FreeCodeCamp and | |
with some assistance from other people's solutions on the internet. I'm not willing to take ownership of | |
the below code beyond that I was on the right track. ie. what is inside the while loop was my own solution. | |
Function calls provided by FreeCodeCamp as ways to test the algorithm*/ | |
function convertToRoman(num) { | |
//Two array of the same length accounting for roman numerals and decimal values those roman numerals represent. | |
var startingNum = num; | |
var decimal = [ 1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1 ]; |
/* JavaScript Algorithms and Data Structures Projects: Caesars Cipher: | |
Challenge designed by FreeCodeCamp, solution derived completely from my learning obtained thanks to FreeCodeCamp | |
and other sources on the internet, notably W3Schools.com, function calls provided by FreeCodeCamp as ways to | |
test the algorithm */ | |
function rot13(str) { | |
var regex = /[A-Z]/; | |
var newStr = ""; | |
var char; | |
//Cycle through the original string |