Ad
Code
Diff
  • function av(num) {
      return Math.abs(num);
    }
    • function av(num) {
    • return Math.abs(num);
    • }
Code
Diff
  • function getChange(allPrice,youMoney) {
      return parseFloat((youMoney-allPrice).toFixed(1));
    }
    • function getChange(allPrice,youMoney){
    • return parseFloat((1-(allPrice/youMoney)).toFixed(4))*youMoney;
    • function getChange(allPrice,youMoney) {
    • return parseFloat((youMoney-allPrice).toFixed(1));
    • }