Ad
Code
Diff
  • getChange=
    (__,_,___=100)=>(
      _=(_-__
      )*(__=___)
      )?(~~_/
      __):_
    
    
    
    
    • function getChange(allPrice,youMoney){
    • return Math.round(youMoney*1000 - allPrice*1000)/1000;
    • }
    • getChange=
    • (__,_,___=100)=>(
    • _=(_-__
    • )*(__=___)
    • )?(~~_/
    • __):_
Code
Diff
  • av=n=>n<0?n/-1:n
    • function av(num) {
    • return Math.abs(num);
    • }
    • av=n=>n<0?n/-1:n