Ask Question
20 March, 15:55

Write a function that returns the total cost of any number of buckets of paint. Ask the user how many buckets he or she is going to buy and for the cost of one bucket. Ask the user the color of the paint. Calculate and return what he or she owes. Change the color of the font to the color of the paint. Use. innerHTML to display your output.

+4
Answers (1)
  1. 20 March, 16:08
    0
    function costOfPaint () {

    let bucket = prompt ('Enter number of paint buckets you want');

    let amountOfBucket = prompt ('How much is one paint bucket');

    let color = prompt ('What color of paint do you want?');

    let totalCost = bucket * amountOfBucket;

    innerHTML = (totalCost);

    }
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Write a function that returns the total cost of any number of buckets of paint. Ask the user how many buckets he or she is going to buy and ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers