Tell us what’s happening:
I’m starting on the cash register challenge, and to be honest, I have no where near any idea of how to start. I read through all of the hints, and I still cant make heads or tails of anything. Does any one have any resources that could help me figure out a way to do this? I feel as though I have a decent grasp of all the concepts in the JS challenges, but I don’t have the ability to figure out how to put all the pieces together into something that would solve this.
Your code so far
function checkCashRegister(price, cash, cid) {
var change;
// Here is your change, ma'am.
return change;
}
// Example cash-in-drawer array:
// [["PENNY", 1.01],
// ["NICKEL", 2.05],
// ["DIME", 3.1],
// ["QUARTER", 4.25],
// ["ONE", 90],
// ["FIVE", 55],
// ["TEN", 20],
// ["TWENTY", 60],
// ["ONE HUNDRED", 100]]
checkCashRegister(19.5, 20, [["PENNY", 1.01], ["NICKEL", 2.05], ["DIME", 3.1], ["QUARTER", 4.25], ["ONE", 90], ["FIVE", 55], ["TEN", 20], ["TWENTY", 60], ["ONE HUNDRED", 100]]);
Your browser information:
User Agent is: Mozilla/5.0 (X11; CrOS aarch64 11151.29.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.49 Safari/537.36
.
Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/javascript-algorithms-and-data-structures-projects/cash-register