Skip to content

Instantly share code, notes, and snippets.

//You'll be given a date as a string (not a Date object). The date will always be formatted as YYYY/MM/DD. You'll be expected to parse the given string and produce a human readable date.
function written_month(month_num) {
switch (month_num) {
case 1:
return "January";
case 2:
return "February";
case 3:
return "March";
//Function calculateChange should return an object which describes the total amount of change for the cashier to give back. Omit any types of change that you shouldn't give back
var change = {};
function resetChange() {
change = {
twentyDollars:0,
tenDollars:0,
fiveDollars:0,
twoDollars:0,