Advertisement
tr00per92

07-lifetimeSupplyCalc

Jul 15th, 2014
683
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function calcSupply() {
  2.     return (arguments[1] - arguments[0]) * 365 * arguments[2];
  3. }
  4. console.log(calcSupply(38, 118, 0.5) + "kg of chocolate would be enough until I am 118 years old.");
  5. console.log(calcSupply(20, 87, 2) + "kg of fruits would be enough until I am 118 years old.");
  6. console.log(calcSupply(16, 102, 1.1) + "kg of nuts would be enough until I am 118 years old.");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement