Lost By 0.01 : project->Cash Register

Lost By 0.01 : project->Cash Register
0

#1
function checkCashRegister(price, cash, cid) {
  var change = cash - price;
  let tmid = tm(cid); let aOc = mic(cid);
  if(change == tmid)
    return {"status": "CLOSED", "change": cid};
  else if( change > tmid || ( change > aOc && change < 1))
    return {'status': 'INSUFFICIENT_FUNDS', 'change': []};
  else 
    return {'status': 'OPEN', 'change': comp(cid, change)};
}

function comp(darr, change){
 let arr = []; let myCh = change;
 let obj = {'PENNY': 0.01, 'NICKEL': 0.05, 'DIME': 0.1, 'QUARTER': 0.25,
            'ONE': 1, 'FIVE': 5, 'TEN': 10, 'TWENTY': 20, 'ONE HUNDRED': 100}
 for(let x=darr.length-1;x>=0;x--){
   let key = darr[x][0]; let pair = darr[x][1];
   let val = obj[key]; 
   if(myCh > val){
     if(myCh > pair){
       arr.push([ key, pair ]);
       console.log(arr);
       myCh -= pair;
     }else{
        var final = myCh % val; 
        if(final == 0){
          arr.push([key, myCh]);
          break;
        }
        else{
           let alas = myCh-final;
           arr.push([key, alas]);
           console.log(arr);
           myCh = final;
       }    
     }
   }
 }
 return arr;
}

function mic(darr){
  let money = 0;
  for(let x=0;x<4;x++){
    money += darr[x][1];
  }
  return money;
}
function tm(darr){
  let money = 0;
  for(let x=0;x<darr.length;x++){
    money += darr[x][1];
  }
  return money;
}

console.log(checkCashRegister(3.26, 100, [["PENNY", 1.01], ["NICKEL", 2.05], ["DIME", 3.1], ["QUARTER", 4.25], ["ONE", 90], ["FIVE", 55], ["TEN", 20], ["TWENTY", 60], ["ONE HUNDRED", 100]]));

I passed all test except for one while I lost by 0.01.
Can anybody tell me where I did the mistake?
Here are the logs:

TWENTY,60,TEN,20,FIVE,15,ONE,1,QUARTER,0.5,DIME,0.2,PENNY,0.03

I need 0.04 at the end instead of 0.03


#2

Solved:

‘10.343432’.toFixed(2);

is used to round after two decimal