Advertisement
popovIliya

March-2022-FirstStepsInCoding-Exercise-Soft Uni - Supplies for School

Mar 4th, 2022
1,189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function payments(input){
  2.  let chemicalsPrice = 5.80;
  3.  let markersPrice = 7.20;
  4.  let preparationPrice = 1.20;
  5.  let chemicals = Number(input[0]);
  6.  let markers = Number(input[1]);
  7.  let preparation = Number(input[2]);
  8.  let discount = Number(input[3]);
  9.  let price = ((chemicals * chemicalsPrice) + (markers * markersPrice) + (preparation * preparationPrice));
  10.  let sum = (price - (price * (discount / 100)));
  11.  console.log(sum);
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement