JavaScript Algorithms and Data Structures Projects - Cash Register

Tell us what’s happening:
Describe your issue in detail here.

Your code so far

const denominations = [

["PENNY", 1], ["NICKEL", 5], ["DIME", 10], ["QUARTER", 25], ["ONE", 100], ["FIVE", 500], ["TEN", 1000], ["TWENTY", 2000], ["ONE HUNDRED", 10000]




 ]




function checkCashRegister(price, cash, cid) {

let changesum = cash*100-price*100;

let changesumcheck = changesum;

let change=[];
let status="";



let cidsum = 0
;

let cidsumfilter = cidsum.filter((elem) => elem[1] !==0).reverse();

cidsumfilter.forEach( elem =>  {


let curr = elem[0];

let currsum = elem[1]*100;

cidsum += currsum;

while (changesum>= )


} )


}

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 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36

Challenge: JavaScript Algorithms and Data Structures Projects - Cash Register

Link to the challenge:

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.