Question: JavaScript Codes? Ever wonder how much a lifetime supply of your favorite snack is? Wonder no more! Write a function named calculateSupply that: o takes
Ever wonder how much a "lifetime supply" of your favorite snack is? Wonder no more! Write a function named calculateSupply that: o takes 2 arguments: age, amount per day. o calculates the amount consumed for rest of the life (based on a constant max age). o outputs the result to the screen like so: "You will need NN to last you until the ripe old age of X" Call that function three times, passing in different values each time
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
