Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function solve (fruit,weight,price){
- let moneyNeeded = (weight/1000)*price;
- let output = `I need $${moneyNeeded.toFixed(2)} to buy ${(weight/1000).toFixed(2)} kilograms ${fruit}.`
- console.log(output);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement