james presley4,569 Points
can anyone show me what is wrong with my code please and thankyou.
const wholesalePrice = 5.45; var retailPrice = 9.99; const quantity = 47; const salesTotal = retailPrice * quantity const profit = salesTotal - (wholesalePrice * quantity); const profitPerunit = salesTotal / quantity;
last task is to get profit per unit. You've already calculated total profit and now you only need to divide total profit by quantity to get profit for one unit. Also make sure to name your variables correctly as code challenge might check on naming your variables too.
const wholesalePrice = 5.45; const retailPrice = 9.99; const quantity = 47; const salesTotal = retailPrice * quantity; const profit = salesTotal - wholesalePrice * quantity; const profitPerUnit = profit / quantity;