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