Ask Question
23 June, 02:58

Assume that a function with this header: function amountSaved (price, discountRate, salesTaxRate) already exists. Write a single line of jа vascript code to call that function and assign the value returned from that function to a variable named saved.

+1
Answers (1)
  1. 23 June, 05:51
    0
    let saved = amountSaved (12, 0.9, 0.06);

    Explanation:

    By presuming there is a jа vascript function amountSaved () that takes three input parameters, price, discountRate & salesTaxRate. To call the function, just simply write the function name, amountSaved followed with a pair of parenthesis. Within the parenthesis, include three testing values, 12, 0.9, 0.06 as arguments. These argument values will be held by the three parameter price, discountRate and salesTaxRate, respectively.

    The function will operate on the three input values and return the result to the main program where the returned result is assigned to a variable name saved.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “Assume that a function with this header: function amountSaved (price, discountRate, salesTaxRate) already exists. Write a single line of ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers